From 8a084c89cff73bef95fd627811c1e1311db8da3c Mon Sep 17 00:00:00 2001 From: chmanie Date: Wed, 20 Nov 2024 15:55:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20JoinColo?= =?UTF-8?q?ny/colonyJS@5d4a2c199275a73e2e9afa052e2bd9163f903cf6=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advanced.js | 2 +- basic.js | 2 +- events.js | 2 +- index.js | 2 +- local-basic.js | 2 +- local-motions.js | 2 +- local-reputation.js | 2 +- metamask.js | 2 +- motions.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/advanced.js b/advanced.js index 96837f00f..e86fba9b5 100644 --- a/advanced.js +++ b/advanced.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),jx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Hx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",rs=null;function mf(n){if(rs==null&&(rs=Hx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw rs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ol=class extends hn{constructor(){super("en")}getWord(e){return mf(this),rs[e]}getWordIndex(e){return mf(this),rs.indexOf(e)}},ul=new ol;hn.register(ul);var bi={en:ul};var hf="hdnode/5.7.0";var ss=new E(hf),qx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Gx=ve("Bitcoin seed"),hr=2147483648;function bf(n){return(1<=256)throw new Error("Depth too large!");return xf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,me(K(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(mr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~hr));let a=new Uint8Array(37);if(e&hr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(ca(Xn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Uo(F.from(r).add(this.privateKey).mod(qx)):l=new cn(K(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(mr,o,l,this.fingerprint,Uo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=hr)throw new Error("invalid path index - "+r);a=a._derive(hr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=hr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(ca(Xn.sha512,Gx,a));return new Ct(mr,Uo(i.slice(0,32)),null,"0x00000000",Uo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=dl(a),e=gi(xr(e,a),a),Ct._fromSeed(ll(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||xf(t.slice(0,78))!==e)&&ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),o=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(mr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(mr,K(o.slice(1)),null,i,s,r,a,null)}return ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function ll(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function xr(n,e){e=dl(e),ss.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=bf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function gi(n,e){if(e=dl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&zx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&bf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function gf(n,e){try{return xr(n,e),!0}catch{}return!1}function Tf(n){return(typeof n!="number"||n<0||n>=hr||n%1)&&ss.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var vf="random/5.7.0";var pl=new E(vf);function Kx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var wf=Kx(),Vo=wf.crypto||wf.msCrypto;(!Vo||!Vo.getRandomValues)&&(pl.warn("WARNING: Missing strong random number source"),Vo={getRandomValues:function(n){return pl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&pl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Vo.getRandomValues(e),j(e)}function os(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var cl=_n(fl());var jo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function br(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:kf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new xa.default.Counter(R),q=new xa.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+br(C.getUTCMonth()+1,2)+"-"+br(C.getUTCDate(),2)+"T"+br(C.getUTCHours(),2)+"-"+br(C.getUTCMinutes(),2)+"-"+br(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:K(R).substring(2),mnemonicCiphertext:K(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Nf(n,e,t){if(Ho(n)){t&&t(0);let a=hl(n,e);return t&&t(1),Promise.resolve(a)}return qo(n)?Pf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Df(n,e){if(Ho(n))return hl(n,e);if(qo(n))return Rf(n,e);throw new Error("invalid JSON wallet")}var Of="wallet/5.7.0";var Bf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},gr=new E(Of);function Xx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Yx(n){let e=n.mnemonic;return e&&e.phrase}var In=class extends St{constructor(e,t){if(super(),Xx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&gr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Yx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&gr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&gr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&gr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new In(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&gr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(ns(t)));return ns(t,a)})}signMessage(e){return Bf(this,void 0,void 0,function*(){return Vr(this._signingKey().signDigest(nr(e)))})}_signTypedData(e,t,a){return Bf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&gr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Vr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),vl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return In.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Nf(e,t,a).then(i=>new In(i))}static fromEncryptedJsonSync(e,t){return new In(Df(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new In(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Ff(n,e){return ci(nr(n),e)}function Lf(n,e,t,a){return ci(bt.hash(n,e,t),a)}var ta={};Gi(ta,{AlchemyProvider:()=>Ar,AlchemyWebSocketProvider:()=>gs,AnkrProvider:()=>Ts,BaseProvider:()=>ea,CloudflareProvider:()=>vs,EtherscanProvider:()=>ws,FallbackProvider:()=>ks,Formatter:()=>Y,InfuraProvider:()=>Mr,InfuraWebSocketProvider:()=>Es,IpcProvider:()=>Dl,JsonRpcBatchProvider:()=>ru,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>_r,NodesmithProvider:()=>Ms,PocketProvider:()=>Cs,Provider:()=>$t,Resolver:()=>wr,StaticJsonRpcProvider:()=>bs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Is,WebSocketProvider:()=>Ta,getDefaultProvider:()=>su,getNetwork:()=>ds,isCommunityResourcable:()=>kl,isCommunityResource:()=>ys,showThrottleMessage:()=>Zn});var Uf="networks/5.7.1";var Vf=new E(Uf);function Zx(n){return n&&typeof n.renetwork=="function"}function ba(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ba(t)},e}function Ko(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Ko(n,a)},t}var jf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Hf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},qf={chainId:63,name:"classicMordor",_defaultProvider:Ko("https://www.ethercluster.com/mordor","classicMordor")},zo={unspecified:{chainId:0,name:"unspecified"},homestead:jf,mainnet:jf,morden:{chainId:2,name:"morden"},ropsten:Hf,testnet:Hf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ba("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ba("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ba("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ba("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Ko("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qf,classicTestnet:qf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ko("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ba("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ba("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ds(n){if(n==null)return null;if(typeof n=="number"){for(let a in zo){let i=zo[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=zo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=zo[n.name];if(!e)return typeof n.chainId!="number"&&Vf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Vf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Zx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Gf="web/5.7.1";var e5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function zf(n,e){return e5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var t5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Sn=new E(Gf);function Kf(n){return new Promise(e=>{setTimeout(e,n)})}function Oa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function n5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function wl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Sn.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;Sn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Sn.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Sn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+tr(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?er(_[3]):n5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Sn.throwError("processing response error",E.errors.SERVER_ERROR,{body:Oa(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Sn.makeError("timeout",E.errors.TIMEOUT,{requestBody:Oa(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return t5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Sn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Oa(H,U.headers?U.headers["content-type"]:null),requestBody:Oa(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){Sn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return wl(n,i,a)}function Pn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var Cl=_n(Qf());var ke="providers/5.7.2";var ps=new E(ke),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():ps.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===po?null:t}contractAddress(e){return li(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Nt(a)!==32?ps.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return No(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ps.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ps.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ps.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function kl(n){return n&&typeof n.isCommunityResource=="function"}function ys(n){return kl(n)&&n.isCommunityResource()}var Xf=!1;function Zn(){Xf||(Xf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),l5=10;function Yf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Zf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Yf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Yf(e)}).join("&")}function p5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function vr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Zf(n);if(wo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Zf(n.topics||[])}throw new Error("invalid event - "+n)}function fs(){return new Date().getTime()}function ec(n){return new Promise(e=>{setTimeout(e,n)})}var y5=["block","network","pending","poll"],Il=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=p5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||y5.indexOf(this.tag)>=0}},f5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Al(n){return me(F.from(n).toHexString(),32)}function tc(n){return fa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var ic=new RegExp("^(ipfs)://(.*)$","i"),nc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ic,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(n,e){try{return Jt(cs(n,e))}catch{}return null}function cs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function El(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function ac(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function c5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function rc(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",rc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=cs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?cs(a,0):null})}_getAddress(e,t){let a=f5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return tc(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return tc(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Cl.default.toWords(i.slice(2));return o.unshift(s),Cl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Yi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Al(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Al(64),Al(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},Ml=null,m5=1,ea=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Ml==null&&(Ml=new Y),Ml}static getNetwork(e){return ds(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(fs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=fs(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=fs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=m5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield ec(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=fs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield ec(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return K(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>K(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?K(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=l5&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Pn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new wr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ia(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Qo(yield this.call({to:a,data:"0x691f3431"+Ia(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new wr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=Qo(yield this.call({to:s,data:"0x691f3431"+Ia(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new Il(vr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=vr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=vr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=vr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=vr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=vr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),h5=["call","estimateGas"];function hs(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=hs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return hs(JSON.parse(n),e)}catch{}return null}function oc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=hs(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=hs(e.body,!1);r==null&&(r=hs(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),h5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function sc(n){return new Promise(function(e){setTimeout(e,n)})}function x5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function ms(n){return n&&n.toLowerCase()}var Sl={},_r=class extends St{constructor(e,t,a){if(super(),e!==Sl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Rl(Sl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),oc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ga(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ga(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ga(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Rl=class extends _r{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},b5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends ea{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ga(this,void 0,void 0,function*(){yield sc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _r(Sl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Rn(this.connection,JSON.stringify(a),x5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ms(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ms(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ms(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ms(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ms(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ga(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return oc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return sc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(b5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Un(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=K(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var kr=null;try{if(kr=WebSocket,kr==null)throw new Error("inject please")}catch{let e=new E(ke);kr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Pl=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Xo=new E(ke),g5=1,Ta=class extends Yt{constructor(e,t){t==="any"&&Xo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new kr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Xo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Xo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Pl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Xo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=g5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Pl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Pl(this,void 0,void 0,function*(){this.websocket.readyState===kr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var T5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xs=new E(ke),bs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return T5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||xs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends bs{constructor(e,t){xs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){xs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return xs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return xs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var uc=new E(ke),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",gs=class extends Ta{constructor(e,t){let a=new Ar(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Yo}},Ar=class extends It{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&uc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:uc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var v5=new E(ke),Zo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function w5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return v5.throwArgumentError("unsupported network","name",n)}var Ts=class extends It{isCommunityResource(){return this.apiKey===Zo}static getApiKey(e){return e??Zo}static getUrl(e,t){t==null&&(t=Zo);let a={allowGzip:!0,url:"https://"+w5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Zo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var _5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},dc=new E(ke),vs=class extends It{static getApiKey(e){return e!=null&&dc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:dc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return _5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var eu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ba=new E(ke);function lc(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Un(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function k5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function pc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function yc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Nl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Ba.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Ba.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ba.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Ba.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Ba.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var ws=class extends ea{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Ba.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return eu(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?pc:k5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Rn(o,l,s||pc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return eu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return eu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Nl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=lc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Nl("call",r,t.transaction)}}case"estimateGas":{let i=lc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Nl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=yc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=yc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ba.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ba.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var au=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(ke);function tu(){return new Date().getTime()}function fc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Er(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Er(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Er(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var A5=1;function mc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var E5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],M5=["address","args","errorArgs","errorSignature","method","transaction"];function nu(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function C5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function I5(n,e,t){let a=Er;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=cc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return cc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,Er(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Er(i))}:a=function(i){return i==null?null:Er(i)};break;default:throw new Error("unknown method: "+e)}return C5(a,n.quorum)}function _s(n,e){return au(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function S5(n,e,t,a){return au(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield _s(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var ks=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=ys(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ys(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ti.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&Ti.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=fc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return au(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return fc(e)})}perform(e,t){return au(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=tu(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=S5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,tu()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:nu(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield mc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return E5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};M5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ti.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ti.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>nu(l)),provider:this})})}};var Dl=null;var iu=new E(ke),As="84842078b09946638c03157f83405213",Es=class extends Ta{constructor(e,t){let a=new Mr(e,t),i=a.connection;i.password&&iu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===As}},Mr=class extends It{static getWebSocketProvider(e,t){return new Es(e,t)}static getApiKey(e){let t={apiKey:As,projectId:As,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(iu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),iu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:iu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===As&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===As}};var ru=class extends Yt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Rn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ol=new E(ke),R5="ETHERS_JS_SHARED",Ms=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ol.throwArgumentError("invalid apiKey","apiKey",e),e||R5}static getUrl(e,t){Ol.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ol.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var hc=new E(ke),xc="62e1ad51b37b8e00394bda3b",Cs=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=xc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:hc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:hc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===xc}};var bc=new E(ke),P5=1;function gc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:P5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function N5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var Is=class extends Yt{constructor(e,t){e==null&&bc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=N5(e)):e.sendAsync?i=gc(e,e.sendAsync.bind(e)):e.send?i=gc(e,e.send.bind(e)):bc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Tc=new E(ke);function su(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Yt(n);case"ws":case"wss":return new Ta(n);default:Tc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ds(n);return(!t||!t._defaultProvider)&&Tc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:ks,AlchemyProvider:Ar,AnkrProvider:Ts,CloudflareProvider:vs,EtherscanProvider:ws,InfuraProvider:Mr,JsonRpcProvider:Yt,NodesmithProvider:Ms,PocketProvider:Cs,Web3Provider:Is,IpcProvider:null},e)}var te={};Gi(te,{AbiCoder:()=>Zi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Sa,LogDescription:()=>ar,Logger:()=>E,ParamType:()=>pt,RLP:()=>no,SigningKey:()=>cn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>ir,TransactionTypes:()=>Po,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ho,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>wl,_toEscapedUtf8String:()=>Md,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Nd,checkProperties:()=>Wi,checkResultErrors:()=>$i,commify:()=>Cc,computeAddress:()=>mn,computeHmac:()=>ca,computePublicKey:()=>ts,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Qr,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Rn,formatBytes32String:()=>Cd,formatEther:()=>Ic,formatUnits:()=>Bl,getAccountPath:()=>Tf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Ny,getIcapAddress:()=>Py,getJsonWalletAddress:()=>xl,getStatic:()=>mt,hashMessage:()=>nr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>hd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ry,isBytes:()=>on,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>gf,isValidName:()=>Od,joinSignature:()=>Vr,keccak256:()=>fe,mnemonicToEntropy:()=>xr,mnemonicToSeed:()=>ll,namehash:()=>Ia,nameprep:()=>Pd,parseBytes32String:()=>Id,parseEther:()=>Sc,parseTransaction:()=>No,parseUnits:()=>Fl,poll:()=>Pn,randomBytes:()=>Yn,recoverAddress:()=>ci,recoverPublicKey:()=>Ro,resolveProperties:()=>Ie,ripemd160:()=>is,serializeTransaction:()=>ns,sha256:()=>Xt,sha512:()=>sl,shallowCopy:()=>we,shuffled:()=>os,solidityKeccak256:()=>_c,solidityPack:()=>ou,soliditySha256:()=>kc,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ca,toUtf8String:()=>Jt,verifyMessage:()=>Ff,verifyTypedData:()=>Lf,zeroPad:()=>si});var vc="solidity/5.7.0";var D5=new RegExp("^bytes([0-9]+)$"),O5=new RegExp("^(u?int)([0-9]*)$"),B5=new RegExp("^(.*)\\[([0-9]*)\\]$"),F5="0000000000000000000000000000000000000000000000000000000000000000",Cr=new E(vc);function wc(n,e,t){switch(n){case"address":return t?si(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?si(e,32):j(e)}let a=n.match(O5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Cr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(D5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Cr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Cr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+F5).substring(0,66)):e}if(a=n.match(B5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Cr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(wc(i,o,!0))}),ye(s)}return Cr.throwArgumentError("invalid type","type",n)}function ou(n,e){n.length!=e.length&&Cr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(wc(a,e[i]))}),K(ye(t))}function _c(n,e){return fe(ou(n,e))}function kc(n,e){return Xt(ou(n,e))}var Ac="units/5.7.0";var Ec=new E(Ac),Mc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Cc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Ec.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Bl(n,e){if(typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return Ki(n,e??18)}function Fl(n,e){if(typeof n!="string"&&Ec.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function Ic(n){return Bl(n,18)}function Sc(n){return Fl(n,18)}var uu="ethers/5.7.2";var Rc=new E(uu);try{let n=window;n._ethers==null&&(n._ethers=Ll)}catch{}var Nn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Nn||(Nn={}));var Pc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Pc||(Pc={}));var du;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(du||(du={}));var Ir;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Ir||(Ir={}));var lu;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(lu||(lu={}));var Ul;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Ul||(Ul={}));var Ss;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ss||(Ss={}));var Rs;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Rs||(Rs={}));var Vl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Vl||(Vl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Hl="0x12345678",jl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(jl||(jl={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var ql=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],vi=class{static createInterface(){return new te.Interface(ql)}static connect(e,t){return new oe(e,ql,t)}};xe(vi,"abi",ql);var Gl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(wi,"abi",Gl);var Nc=(n,e)=>{throw new Error(`${e}: ${n}`)},zl=n=>n!=null;var{keccak256:U5,toUtf8Bytes:V5}=te,{MaxUint256:j5}=ht;var Ps=n=>te.formatEther(n),Dc=n=>te.parseEther(n),pu=n=>Dc(n[0]),Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(zl)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return j5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},Fa=n=>U5(V5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Wl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(zl);var{hexDataSlice:Jl}=te,{MaxUint256:H5}=ht,Oc=n=>{let e=Jl(n,0,3),t=F.from(Jl(n,4,35)),a=F.from(Jl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Bc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),H5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await _i(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},q5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Bc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):q5(n,e,t,a,i):Bc(n,e,t,a,i);var{MaxUint256:Fc}=ht,{AddressZero:G5}=ht;async function z5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ns(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Oc(s),I=vi.connect(r,a.signer||a.provider),_=await z5(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Fc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Fc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,G5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:K5}=ht,aa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Nn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Ir[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await aa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${K5}/noProof`,s=await aa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Lc=10,Mk=Et(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vc=Lc-1;var jc=3,Sk=Et(jc),Hc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},qc=jc-1;var Gc=10,Nk=Et(Gc),zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=Gc-1;var Wc=7,Bk=Et(Wc),Jc={1:[],2:[],3:[],4:[],5:[],6:[]},$c=Wc-1;var Qc=8,Uk=Et(Qc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Yc=Qc-1;var Zc=5,Hk=Et(Zc),em={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},tm=Zc-1;var nm=7,zk=Et(nm),am={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},im=nm-1;var rm=10,Jk=Et(rm),sm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},om=rm-1;var um=14,Xk=Et(um),$l={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Ql=um-1;var dm=18,W5=Et(dm),eA=dm-1;var J5=(n,e)=>{switch(n){case Ae.FundingQueue:return Uc[e];case Ae.IVotingReputation:return $l[e];case Ae.MultisigPermissions:return Hc[e];case Ae.OneTxPayment:return zc[e];case Ae.ReputationBootstrapper:return Jc[e];case Ae.StagedExpenditure:return em[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return am[e];case Ae.TokenSupplier:return sm[e];case Ae.VotingReputation:return $l[e];default:return Nc(n,"Could not find extension with name")}},ki=(n,e,t)=>{let a=J5(n,e);return!!a&&!a.includes(t)};var $5={[Ae.FundingQueue]:Vc,[Ae.IVotingReputation]:Ql,[Ae.MultisigPermissions]:qc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:$c,[Ae.StagedExpenditure]:tm,[Ae.StakedExpenditure]:Yc,[Ae.StreamingPayments]:im,[Ae.TokenSupplier]:om,[Ae.VotingReputation]:Ql};var R6=_n(lm(),1);var bp=_n(C6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var xp=2,hp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(hp||(hp={}));var I6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,u1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),gp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==xp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=I6(t.errors);throw new Error(a)};var S6=(n,e)=>{let t=n===Re.Colony?u1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:xp});if(!a.success){let i=I6(a.errors);throw new Error(i)}return a.data};var Tp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},vp=Tp;var wp=(0,R6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),js={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Or=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(js).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await wp(a)).json();return gp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await wp(a)).json(),s=Object.entries(js).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return gp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await wp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=S6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var d1=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0,_p=class{token;PINATA_GATEWAY_ENDPOINT="https://gateway.pinata.cloud/ipfs";name="PINATA";constructor(e){let t=e||d1;if(!t)throw new Error('Cannot find pinata token. Please supply it as an argument to the class or as "process.env.COLONY_IPFS_PINATA_TOKEN (in NodeJS)"');this.token=t}getIpfsUrl(e){return`${this.PINATA_GATEWAY_ENDPOINT}/${e}`}async uploadJson(e){return(await(await fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({pinataContent:JSON.parse(e)})})).json()).IpfsHash}},kp=_p;var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(Tn,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Si,"abi",Mp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],P6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",f1=n=>n.length>1,Dn=class extends hi{constructor(...e){f1(e)?super(...e):super(Ku,P6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Dn,"bytecode",P6),xe(Dn,"abi",Ku);var Cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ri,"abi",Cp);var Pi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Pi||(Pi={}));var On;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(On||(On={}));var{AddressZero:x1}=ht;async function b1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var g1=async(n,e)=>{let t,a=!0,i=!0;t=Dn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await b1(t)}catch{a=!1}try{await t.nonces(x1)}catch{i=!1}return a?t.tokenClientType=On.Colony:i?(t=vn.connect(n,e),t.tokenClientType=On.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=On.Erc20),t.clientType=Pi.TokenClient,t},Ip=g1;var T1=(n,e)=>{let t=Ri.connect(n,e);return t.clientType=Pi.TokenLockingClient,t},Sp=T1;var{AddressZero:Rp}=ht,v1=Tn.connect(Rp,new ta.BaseProvider(3656691)).interface,w1=Si.connect(Rp,new ta.BaseProvider(3656691)).interface,_1=vn.connect(Rp,new ta.BaseProvider(3656691)).interface;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Hs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Hs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],qs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ni.abi=Dp;var va=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,js[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Wl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:A1,solidityKeccak256:E1,splitSignature:M1}=te,Va=class extends va{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=E1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=A1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=M1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Wu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Di.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Oi.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Bi.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Fi.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Li.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Ui.abi=Vp;var{AddressZero:D1}=ht,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Bn.extensionType),e.address);if(t===D1)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},ja=Bn;ja.supportedVersions=[{version:3,factory:Fi},{version:4,factory:Li},{version:5,factory:Ui}],ja.extensionType=Ae.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Gs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Dn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var zs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var N6=async(n,e)=>{let t=await Ip(e,n.config.signerOrProvider);switch(t.tokenClientType){case On.Colony:return new Gs(n,t);case On.Erc20:return new Fn(n,t);case On.Erc2612:return new zs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var jp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Vi.abi=jp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};ji.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Hi.abi=qp;var{AddressZero:Gp}=ht;var Ju=F.from(10).pow(18),Ln=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Ln.extensionType),e.address);if(t===Gp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Ln.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Ln.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Ln(e,r,a)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ns(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Gp,Hl);return[e,t,Gp,Hl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Wu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ps(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Ln;Ha.supportedVersions=[{version:7,factory:Vi},{version:8,factory:ji},{version:9,factory:Hi}],Ha.extensionType=Ae.VotingReputation;var L1={["motion"]:Ha,["oneTx"]:ja},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await N6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Fn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=L1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ki(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Fa(i),t.getLatestSupportedVersion()],async s=>({...Wu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Di},{version:12,factory:Oi},{version:13,factory:Bi}];var{splitSignature:U1}=te,$u=class extends va{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=U1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ks=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Sp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Ws=class{constructor(e,t){let a=t?.network||Nn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||lu[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Ir[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:D6}=te,{AddressZero:zp}=ht,Js=class{constructor(e,t){this.config=new Ws(e,t),this.contract=Ni.connect(t?.customNetworkAddress||du[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new $u({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[zp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getColonyAddress(e){let t=D6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.config.network],""):null}async getUserAddress(e){let t=D6(`${e}${Rs[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:V1}=te,O6=new ta.Web3Provider(window.ethereum),qi,qa={},j1=async(n,e)=>new Js(e,{ipfsAdapter:new kp("INVALID")}).getColony(n),H1=async()=>{let n=await qi.getBalance();return Ps(n)},q1=async()=>{let n="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,a]=await qi.createTeam(n).tx().mined();if(!e||!t||!a)throw new Error("Transaction event data not found");let i=await a();if(!i)throw new Error("No metadata found");console.info(i);let[{domainId:r}]=await qi.deprecateTeam(e,!0).tx().mined();console.info(`${r} successfully deprecated`);let{data:{domainName:s,domainColor:o,domainPurpose:l}}=i;return{domainId:e,fundingPotId:t,domainName:s,domainColor:o,domainPurpose:l}},G1=async()=>{if(!qa.domainId)throw new Error("No domain created yet");let[,n]=await qi.moveFundsToTeam(pu`0.66`,qa.domainId).tx().mined();return n},z1=async n=>{if(!qi.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await qi.ext.oneTx.pay(n,pu`0.42`,qa.domainId).tx().mined();return e},K1=async()=>(await O6.send("eth_requestAccounts",[]),O6.getSigner()),Qu=document.querySelector("#address"),B6=document.querySelector("#button_connect"),F6=document.querySelector("#button_team"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),j6=document.querySelector("#result");if(!Qu||!U6||!Kp||!j6||!B6||!F6||!L6||!V6)throw new Error("Could not find all required HTML elements");var Ur=n=>{Kp.innerText=`Found an error: ${n.message}`,console.error(n)},W1=()=>{Kp.innerText=""},wn=n=>{j6.innerText=n};B6.addEventListener("click",async()=>{W1();let n=Qu.value;if(!V1(n))return Ur(new Error("This is not a valid address"));wn("Processing...");let e=await K1();try{let t=await j1(Qu.value,e);qi=t;let a=await H1(),i=await t.token.symbol();wn(` +`)}`,u1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),gp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==xp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=I6(t.errors);throw new Error(a)};var S6=(n,e)=>{let t=n===Re.Colony?u1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=bp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:xp});if(!a.success){let i=I6(a.errors);throw new Error(i)}return a.data};var Tp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},vp=Tp;var wp=(0,R6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),js={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Or=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(js).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await wp(a)).json();return gp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await wp(a)).json(),s=Object.entries(js).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return gp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await wp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=S6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var d1=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0,_p=class{token;PINATA_GATEWAY_ENDPOINT="https://gateway.pinata.cloud/ipfs";name="PINATA";constructor(e){let t=e||d1;if(!t)throw new Error('Cannot find pinata token. Please supply it as an argument to the class or as "process.env.COLONY_IPFS_PINATA_TOKEN (in NodeJS)"');this.token=t}getIpfsUrl(e){return`${this.PINATA_GATEWAY_ENDPOINT}/${e}`}async uploadJson(e){return(await(await fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({pinataContent:JSON.parse(e)})})).json()).IpfsHash}},kp=_p;var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(Tn,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Si,"abi",Mp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],P6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",f1=n=>n.length>1,Dn=class extends hi{constructor(...e){f1(e)?super(...e):super(Ku,P6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Dn,"bytecode",P6),xe(Dn,"abi",Ku);var Cp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ri,"abi",Cp);var Pi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Pi||(Pi={}));var On;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(On||(On={}));var{AddressZero:x1}=ht;async function b1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var g1=async(n,e)=>{let t,a=!0,i=!0;t=Dn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await b1(t)}catch{a=!1}try{await t.nonces(x1)}catch{i=!1}return a?t.tokenClientType=On.Colony:i?(t=vn.connect(n,e),t.tokenClientType=On.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=On.Erc20),t.clientType=Pi.TokenClient,t},Ip=g1;var T1=(n,e)=>{let t=Ri.connect(n,e);return t.clientType=Pi.TokenLockingClient,t},Sp=T1;var{AddressZero:Rp}=ht,v1=Tn.connect(Rp,new ta.BaseProvider(3656691)).interface,w1=Si.connect(Rp,new ta.BaseProvider(3656691)).interface,_1=vn.connect(Rp,new ta.BaseProvider(3656691)).interface;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Hs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Hs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],qs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ni.abi=Dp;var va=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,js[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Wl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:A1,solidityKeccak256:E1,splitSignature:M1}=te,Va=class extends va{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=E1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=A1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=M1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Wu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Di.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Oi.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Bi.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Fi.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Li.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Ui.abi=Vp;var{AddressZero:D1}=ht,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Bn.extensionType),e.address);if(t===D1)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},ja=Bn;ja.supportedVersions=[{version:3,factory:Fi},{version:4,factory:Li},{version:5,factory:Ui}],ja.extensionType=Ae.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Gs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Dn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var zs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var N6=async(n,e)=>{let t=await Ip(e,n.config.signerOrProvider);switch(t.tokenClientType){case On.Colony:return new Gs(n,t);case On.Erc20:return new Fn(n,t);case On.Erc2612:return new zs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var jp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Vi.abi=jp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};ji.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Hi.abi=qp;var{AddressZero:Gp}=ht;var Ju=F.from(10).pow(18),Ln=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Ln.extensionType),e.address);if(t===Gp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Ln.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Ln.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Ln(e,r,a)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ns(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Gp,Hl);return[e,t,Gp,Hl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Wu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ps(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ha=Ln;Ha.supportedVersions=[{version:7,factory:Vi},{version:8,factory:ji},{version:9,factory:Hi}],Ha.extensionType=Ae.VotingReputation;var L1={["motion"]:Ha,["oneTx"]:ja},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await N6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Fn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=L1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ki(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Fa(i),t.getLatestSupportedVersion()],async s=>({...Wu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Di},{version:12,factory:Oi},{version:13,factory:Bi}];var{splitSignature:U1}=te,$u=class extends va{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Nn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=U1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Ks=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Sp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Ws=class{constructor(e,t){let a=t?.network||Nn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||lu[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Ir[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:D6}=te,{AddressZero:zp}=ht,Js=class{constructor(e,t){this.config=new Ws(e,t),this.contract=Ni.connect(t?.customNetworkAddress||du[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new $u({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[zp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getColonyAddress(e){let t=D6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.config.network],""):null}async getUserAddress(e){let t=D6(`${e}${Rs[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:V1}=te,O6=new ta.Web3Provider(window.ethereum),qi,qa={},j1=async(n,e)=>new Js(e,{ipfsAdapter:new kp("INVALID")}).getColony(n),H1=async()=>{let n=await qi.getBalance();return Ps(n)},q1=async()=>{let n="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,a]=await qi.createTeam(n).tx().mined();if(!e||!t||!a)throw new Error("Transaction event data not found");let i=await a();if(!i)throw new Error("No metadata found");console.info(i);let[{domainId:r}]=await qi.deprecateTeam(e,!0).tx().mined();console.info(`${r} successfully deprecated`);let{data:{domainName:s,domainColor:o,domainPurpose:l}}=i;return{domainId:e,fundingPotId:t,domainName:s,domainColor:o,domainPurpose:l}},G1=async()=>{if(!qa.domainId)throw new Error("No domain created yet");let[,n]=await qi.moveFundsToTeam(pu`0.66`,qa.domainId).tx().mined();return n},z1=async n=>{if(!qi.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await qi.ext.oneTx.pay(n,pu`0.42`,qa.domainId).tx().mined();return e},K1=async()=>(await O6.send("eth_requestAccounts",[]),O6.getSigner()),Qu=document.querySelector("#address"),B6=document.querySelector("#button_connect"),F6=document.querySelector("#button_team"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),j6=document.querySelector("#result");if(!Qu||!U6||!Kp||!j6||!B6||!F6||!L6||!V6)throw new Error("Could not find all required HTML elements");var Ur=n=>{Kp.innerText=`Found an error: ${n.message}`,console.error(n)},W1=()=>{Kp.innerText=""},wn=n=>{j6.innerText=n};B6.addEventListener("click",async()=>{W1();let n=Qu.value;if(!V1(n))return Ur(new Error("This is not a valid address"));wn("Processing...");let e=await K1();try{let t=await j1(Qu.value,e);qi=t;let a=await H1(),i=await t.token.symbol();wn(` Connected to Colony with address: ${n}. Colony version: ${t.version}. Native token funding: ${a} ${i} diff --git a/basic.js b/basic.js index cddcc709a..7aa6e8024 100644 --- a/basic.js +++ b/basic.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Sx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Rx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function df(n){if(ts==null&&(ts=Rx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var nl=class extends hn{constructor(){super("en")}getWord(e){return df(this),ts[e]}getWordIndex(e){return df(this),ts.indexOf(e)}},al=new nl;hn.register(al);var hi={en:al};var lf="hdnode/5.7.0";var ns=new E(lf),Px=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Nx=ve("Bitcoin seed"),fr=2147483648;function yf(n){return(1<=256)throw new Error("Depth too large!");return pf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,me(K(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(yr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fr));let a=new Uint8Array(37);if(e&fr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Bo(F.from(r).add(this.privateKey).mod(Px)):l=new cn(K(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(yr,o,l,this.fingerprint,Bo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,Nx,a));return new Ct(yr,Bo(i.slice(0,32)),null,"0x00000000",Bo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=il(a),e=xi(cr(e,a),a),Ct._fromSeed(rl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),o=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function rl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=il(e),ns.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=yf(s);if((j(Yt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=il(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[0]&yf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function ff(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var sl=new E(mf);function Ox(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hf=Ox(),Fo=hf.crypto||hf.msCrypto;(!Fo||!Fo.getRandomValues)&&(sl.warn("WARNING: Missing strong random number source"),Fo={getRandomValues:function(n){return sl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&sl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Fo.getRandomValues(e),j(e)}function as(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var dl=wn(ul());var Lo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:K(R).substring(2),mnemonicCiphertext:K(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Uo(n)){t&&t(0);let a=pl(n,e);return t&&t(1),Promise.resolve(a)}return Vo(n)?Ef(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Uo(n))return pl(n,e);if(Vo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&hr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&hr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&hr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Br(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),hl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Il,JsonRpcBatchProvider:()=>nu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>au,getNetwork:()=>rs,isCommunityResourcable:()=>gl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new E(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function qo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return qo(n,a)},t}var Of={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Ff={chainId:63,name:"classicMordor",_defaultProvider:qo("https://www.ethercluster.com/mordor","classicMordor")},Ho={unspecified:{chainId:0,name:"unspecified"},homestead:Of,mainnet:Of,morden:{chainId:2,name:"morden"},ropsten:Bf,testnet:Bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ho){let i=Ho[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Ho[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ho[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lf="web/5.7.1";var qx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var Gx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function xl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return xl(n,i,a)}function Rn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var _l=wn(Gf());var ke="providers/5.7.2";var os=new E(ke),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(f),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():os.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===oo?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Nt(a)!==32?os.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return So(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):os.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&os.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function gl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return gl(n)&&n.isCommunityResource()}var zf=!1;function Xn(){zf||(zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Zx=10;function Kf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Wf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Kf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Kf(e)}).join("&")}function e5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Wf(n);if(go.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Wf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],kl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.indexOf(this.tag)>=0}},n5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Tl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Wo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function vl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=_l.default.toWords(i.slice(2));return o.unshift(s),_l.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===$i?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Tl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Tl(64),Tl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},wl=null,i5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return wl==null&&(wl=new X),wl}static getNetwork(e){return rs(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=ds();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=i5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jf(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>K(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?K(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ca(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Wo(yield this.call({to:a,data:"0x691f3431"+Ca(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new gr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=Wo(yield this.call({to:s,data:"0x691f3431"+Ca(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new kl(br(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=br(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=br(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),r5=["call","estimateGas"];function ys(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function ps(n){return n&&n.toLowerCase()}var Al={},Tr=class extends St{constructor(e,t,a){if(super(),e!==Al)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new El(Al,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},El=class extends Tr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield ec(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(Al,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ps(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ps(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ps(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ps(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ps(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return tc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return ec(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=K(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ml=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Jo=new E(ke),u5=1,ga=class extends Xt{constructor(e,t){t==="any"&&Jo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new vr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Jo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Jo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Jo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=u5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Ml(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Ml(this,void 0,void 0,function*(){this.websocket.readyState===vr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var d5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new E(ke),$o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===$o}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?$o:(e&&typeof e!="string"&&nc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===$o&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===$o}};var l5=new E(ke),Qo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Qo}static getApiKey(e){return e??Qo}static getUrl(e,t){t==null&&(t=Qo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Qo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var Yo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new E(ke);function ic(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function f5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function rc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Cl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var bs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return Yo(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?rc:f5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Yo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Yo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Cl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ic(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Cl("call",r,t.transaction)}}case"estimateGas":{let i=ic(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Cl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=sc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=sc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var eu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Xo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>_r(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var m5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Zo(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function x5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function b5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=uc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return uc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return eu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return eu(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=us(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=us(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return eu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return oc(e)})}perform(e,t){return eu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Xo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Xo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Xo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};h5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Zo(l)),provider:this})})}};var Il=null;var tu=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&tu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){let t={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(tu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),tu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:tu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var nu=class extends Xt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Sl=new E(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Sl.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Sl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Sl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new E(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:lc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:lc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===pc}};var yc=new E(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var As=class extends Xt{constructor(e,t){e==null&&yc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=w5(e)):e.sendAsync?i=fc(e,e.sendAsync.bind(e)):e.send?i=fc(e,e.send.bind(e)):yc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new E(ke);function au(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>Zs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Io,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>fo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>xl,_toEscapedUtf8String:()=>wd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Cd,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>_d,formatEther:()=>_c,formatUnits:()=>Rl,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>yl,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>pd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Sd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>rl,namehash:()=>Ca,nameprep:()=>Md,parseBytes32String:()=>kd,parseEther:()=>kc,parseTransaction:()=>So,parseUnits:()=>Pl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Co,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>tl,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>iu,soliditySha256:()=>bc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ii});var mc="solidity/5.7.0";var _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),E5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(mc);function hc(n,e,t){switch(n){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+E5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function iu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),K(ye(t))}function xc(n,e){return fe(iu(n,e))}function bc(n,e){return Yt(iu(n,e))}var gc="units/5.7.0";var Tc=new E(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Rl(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Pl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function _c(n){return Rl(n,18)}function kc(n){return Pl(n,18)}var ru="ethers/5.7.2";var Ac=new E(ru);try{let n=window;n._ethers==null&&(n._ethers=Nl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ec;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ec||(Ec={}));var su;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(su||(su={}));var Er;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Er||(Er={}));var ou;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ou||(ou={}));var Es;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Es||(Es={}));var Ms;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Cs;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Cs||(Cs={}));var Is;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Is||(Is={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new ne.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ne.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Mc=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},Ba=n=>C5(I5(n));var Mr=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),R5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await vi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),uu(t)}catch{return[]}}async function Ss(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,yk=Et(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,mk=Et(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,bk=Et(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,vk=Et(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,kk=Et(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Kc=5,Mk=Et(Kc),Wc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Kc-1;var $c=7,Sk=Et($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Nk=Et(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Bk=Et(tm),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Et(nm),Uk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Wc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=wn(am(),1);var yp=wn(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var w6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ls={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Ls).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Ls).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var dE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Hu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],A6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Hu,A6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(Hu)}static connect(e,t){return new oe(e,Hu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Hu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=vn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Us=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Us.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Vs=class{static createInterface(){return new ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Vs.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Ls[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},qu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var js=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new js(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Hs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Gu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ne.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ss(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...qu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return uu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,zu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Gs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ou[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,zs=class{constructor(e,t){this.config=new Gs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||su[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new zu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Cs[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider(Es.ArbitrumOne),R1=async n=>{let a=await(await new zs(S1).getColony(n)).getBalance(Is.ArbitrumOne.CLNY);return C1(a)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},P1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{P1();let n=Up?.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await R1(n),Lp(`${e} CLNY in root domain of Colony with address: ${n}`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); +`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ls={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Ls).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Ls).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var dE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Hu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],A6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Hu,A6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(Hu)}static connect(e,t){return new oe(e,Hu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Hu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=vn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Us=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Us.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Vs=class{static createInterface(){return new ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Vs.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Ls[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},qu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var js=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new js(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Hs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Gu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ne.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ss(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...qu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return uu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,zu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Gs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ou[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,zs=class{constructor(e,t){this.config=new Gs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||su[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new zu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Cs[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider(Es.ArbitrumOne),R1=async n=>{let a=await(await new zs(S1).getColony(n)).getBalance(Is.ArbitrumOne.CLNY);return C1(a)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},P1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{P1();let n=Up?.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await R1(n),Lp(`${e} CLNY in root domain of Colony with address: ${n}`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/events.js b/events.js index a3dd48ba7..5aace532a 100644 --- a/events.js +++ b/events.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Mx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Cx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",es=null;function of(n){if(es==null&&(es=Cx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw es=null,new Error("BIP39 Wordlist for en (English) FAILED")}var $d=class extends hn{constructor(){super("en")}getWord(e){return of(this),es[e]}getWordIndex(e){return of(this),es.indexOf(e)}},Qd=new $d;hn.register(Qd);var hi={en:Qd};var uf="hdnode/5.7.0";var ts=new E(uf),Ix=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Sx=ve("Bitcoin seed"),yr=2147483648;function lf(n){return(1<=256)throw new Error("Depth too large!");return df(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,me(K(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(pr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~yr));let a=new Uint8Array(37);if(e&yr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(ya($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Po(F.from(r).add(this.privateKey).mod(Ix)):l=new cn(K(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(pr,o,l,this.fingerprint,Po(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=yr)throw new Error("invalid path index - "+r);a=a._derive(yr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=yr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(ya($n.sha512,Sx,a));return new Ct(pr,Po(i.slice(0,32)),null,"0x00000000",Po(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Xd(a),e=xi(fr(e,a),a),Ct._fromSeed(Yd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=pa.decode(e);(t.length!==82||df(t.slice(0,78))!==e)&&ts.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),o=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(pr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(pr,K(o.slice(1)),null,i,s,r,a,null)}return ts.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Yd(n,e){e||(e="");let t=ve("mnemonic"+e,qt.NFKD);return mi(ve(n,qt.NFKD),t,2048,64,"sha512")}function fr(n,e){e=Xd(e),ts.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=lf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=Xd(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&Rx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&lf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function pf(n,e){try{return fr(n,e),!0}catch{}return!1}function yf(n){return(typeof n!="number"||n<0||n>=yr||n%1)&&ts.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var ff="random/5.7.0";var Zd=new E(ff);function Px(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var cf=Px(),No=cf.crypto||cf.msCrypto;(!No||!No.getRandomValues)&&(Zd.warn("WARNING: Missing strong random number source"),No={getRandomValues:function(n){return Zd.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Zd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return No.getRandomValues(e),j(e)}function ns(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var nl=wn(tl());var Do="json-wallets/5.7.0";function ca(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function cr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new ma.default.Counter(x),J=new ma.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:hf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Qn(16),N=new ma.default.Counter(R),q=new ma.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+cr(C.getUTCMonth()+1,2)+"-"+cr(C.getUTCDate(),2)+"T"+cr(C.getUTCHours(),2)+"-"+cr(C.getUTCMinutes(),2)+"-"+cr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:K(R).substring(2),mnemonicCiphertext:K(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Af(n,e,t){if(Oo(n)){t&&t(0);let a=il(n,e);return t&&t(1),Promise.resolve(a)}return Bo(n)?kf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ef(n,e){if(Oo(n))return il(n,e);if(Bo(n))return _f(n,e);throw new Error("invalid JSON wallet")}var Mf="wallet/5.7.0";var Cf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},mr=new E(Mf);function Fx(n){return n!=null&&ae(n.privateKey,32)&&n.address!=null}function Lx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),Fx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&mr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Lx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||fa,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&mr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&mr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&mr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&mr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Cf(this,void 0,void 0,function*(){return Or(this._signingKey().signDigest(Yi(e)))})}_signTypedData(e,t,a){return Cf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&mr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Or(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),dl(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Af(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Ef(e,t))}static fromMnemonic(e,t,a){return t||(t=fa),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function If(n,e){return yi(Yi(n),e)}function Sf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var Zn={};Vi(Zn,{AlchemyProvider:()=>vr,AlchemyWebSocketProvider:()=>cs,AnkrProvider:()=>ms,BaseProvider:()=>Yn,CloudflareProvider:()=>hs,EtherscanProvider:()=>xs,FallbackProvider:()=>gs,Formatter:()=>Y,InfuraProvider:()=>_r,InfuraWebSocketProvider:()=>vs,IpcProvider:()=>wl,JsonRpcBatchProvider:()=>Yo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>gr,NodesmithProvider:()=>ws,PocketProvider:()=>_s,Provider:()=>$t,Resolver:()=>br,StaticJsonRpcProvider:()=>fs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>ks,WebSocketProvider:()=>ba,getDefaultProvider:()=>Zo,getNetwork:()=>is,isCommunityResourcable:()=>yl,isCommunityResource:()=>os,showThrottleMessage:()=>Xn});var Rf="networks/5.7.1";var Pf=new E(Rf);function Ux(n){return n&&typeof n.renetwork=="function"}function ha(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ha(t)},e}function Uo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Uo(n,a)},t}var Nf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ha("homestead")},Df={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ha("ropsten")},Of={chainId:63,name:"classicMordor",_defaultProvider:Uo("https://www.ethercluster.com/mordor","classicMordor")},Lo={unspecified:{chainId:0,name:"unspecified"},homestead:Nf,mainnet:Nf,morden:{chainId:2,name:"morden"},ropsten:Df,testnet:Df,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ha("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ha("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ha("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ha("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Uo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Of,classicTestnet:Of,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Uo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ha("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ha("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function is(n){if(n==null)return null;if(typeof n=="number"){for(let a in Lo){let i=Lo[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Lo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Lo[n.name];if(!e)return typeof n.chainId!="number"&&Pf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Pf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Ux(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Bf="web/5.7.1";var Vx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Ff(n,e){return Vx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var jx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Bf);function Lf(n){return new Promise(e=>{setTimeout(e,n)})}function Na(n,e){if(n==null)return null;if(typeof n=="string")return n;if(na(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function Hx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ll(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Qi(_[3]):Hx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.errors.SERVER_ERROR,{body:Na(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.errors.TIMEOUT,{requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return jx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Na(H,U.headers?U.headers["content-type"]:null),requestBody:Na(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ll(n,i,a)}function Rn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var hl=wn(Hf());var ke="providers/5.7.2";var ss=new E(ke),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ae(e))?e.toLowerCase():ss.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ae(e,32))return null;let t=ce(Ce(e,12));return t===ao?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ae(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Pt(a)!==32?ss.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ae(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ae(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ae(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Eo(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ss.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ss.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ss.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function yl(n){return n&&typeof n.isCommunityResource=="function"}function os(n){return yl(n)&&n.isCommunityResource()}var qf=!1;function Xn(){qf||(qf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Qx=10;function Gf(n){return n==null?"null":(Pt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function zf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Gf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Gf(e)}).join("&")}function Xx(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function xr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+zf(n);if(mo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+zf(n.topics||[])}throw new Error("invalid event - "+n)}function us(){return new Date().getTime()}function Kf(n){return new Promise(e=>{setTimeout(e,n)})}var Yx=["block","network","pending","poll"],xl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=Xx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Yx.indexOf(this.tag)>=0}},Zx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function fl(n){return me(F.from(n).toHexString(),32)}function Wf(n){return pa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var Qf=new RegExp("^(ipfs)://(.*)$","i"),Jf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Qf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function qo(n,e){try{return Jt(ds(n,e))}catch{}return null}function ds(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function cl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function $f(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function e5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Xf(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ma(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Xf([Wr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ds(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ds(a,0):null})}_getAddress(e,t){let a=Zx[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Wf(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Wf(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=hl.default.toWords(i.slice(2));return o.unshift(s),hl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Ji?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",fl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([fl(64),fl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},ml=null,t5=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ml==null&&(ml=new Y),ml}static getNetwork(e){return is(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(us()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=us(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=us();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=t5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Kf(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=us();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Kf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return K(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>K(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?K(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Qx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new br(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ma(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ae(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=qo(yield this.call({to:a,data:"0x691f3431"+Ma(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ae(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new br(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=qo(yield this.call({to:s,data:"0x691f3431"+Ma(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new xl(xr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=xr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=xr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=xr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=xr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=xr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var xa=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),n5=["call","estimateGas"];function ps(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ae(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ps(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ps(JSON.parse(n),e)}catch{}return null}function Zf(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ps(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ps(e.body,!1);r==null&&(r=ps(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),n5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Yf(n){return new Promise(function(e){setTimeout(e,n)})}function a5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function ls(n){return n&&n.toLowerCase()}var bl={},gr=class extends Gt{constructor(e,t,a){if(super(),e!==bl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new gl(bl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>xa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Zf("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return xa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>xa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return xa(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return xa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},gl=class extends gr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},i5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return xa(this,void 0,void 0,function*(){yield Yf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new gr(bl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),a5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ls(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ls(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ls(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ls(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ls(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return xa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return Zf(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return Yf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(i5);if(t)for(let r in t)t[r]&&(a[r]=!0);qi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=K(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var Tr=null;try{if(Tr=WebSocket,Tr==null)throw new Error("inject please")}catch{let e=new E(ke);Tr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Tl=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Go=new E(ke),r5=1,ba=class extends Yt{constructor(e,t){t==="any"&&Go.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Tr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Go.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Go.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Tl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Go.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=r5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Tl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Tl(this,void 0,void 0,function*(){this.websocket.readyState===Tr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var s5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ys=new E(ke),fs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return s5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ys.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends fs{constructor(e,t){ys.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){ys.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ys.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ys.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var ec=new E(ke),zo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",cs=class extends ba{constructor(e,t){let a=new vr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===zo}},vr=class extends It{static getWebSocketProvider(e,t){return new cs(e,t)}static getApiKey(e){return e==null?zo:(e&&typeof e!="string"&&ec.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:ec.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===zo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===zo}};var o5=new E(ke),Ko="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function u5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return o5.throwArgumentError("unsupported network","name",n)}var ms=class extends It{isCommunityResource(){return this.apiKey===Ko}static getApiKey(e){return e??Ko}static getUrl(e,t){t==null&&(t=Ko);let a={allowGzip:!0,url:"https://"+u5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ko&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var d5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tc=new E(ke),hs=class extends It{static getApiKey(e){return e!=null&&tc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:tc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return d5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var Wo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Da=new E(ke);function nc(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Fn(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function l5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function ac(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function ic(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function vl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ae(r))return r;Da.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Da.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Da.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Da.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Da.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var xs=class extends Yn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Da.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return Wo(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?ac:l5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||ac);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Wo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Wo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>vl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=nc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("call",r,t.transaction)}}case"estimateGas":{let i=nc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=ic(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=ic(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Da.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Da.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Qo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Jo(){return new Date().getTime()}function rc(n){let e=null;for(let t=0;te?null:(a+i)/2}function wr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>wr(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=wr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var p5=1;function oc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var y5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],f5=["address","args","errorArgs","errorSignature","method","transaction"];function $o(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function c5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function m5(n,e,t){let a=wr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=sc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return sc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,wr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),wr(i))}:a=function(i){return i==null?null:wr(i)};break;default:throw new Error("unknown method: "+e)}return c5(a,n.quorum)}function bs(n,e){return Qo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function h5(n,e,t,a){return Qo(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ae(r.fromBlock)||r.toBlock&&ae(r.toBlock))&&(i=yield bs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var gs=class extends Yn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=os(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=os(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=rc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Qo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return rc(e)})}perform(e,t){return Qo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Jo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=h5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield oc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return y5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};f5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>$o(l)),provider:this})})}};var wl=null;var Xo=new E(ke),Ts="84842078b09946638c03157f83405213",vs=class extends ba{constructor(e,t){let a=new _r(e,t),i=a.connection;i.password&&Xo.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Ts}},_r=class extends It{static getWebSocketProvider(e,t){return new vs(e,t)}static getApiKey(e){let t={apiKey:Ts,projectId:Ts,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Xo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Xo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Xo.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Ts&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Ts}};var Yo=class extends Yt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var _l=new E(ke),x5="ETHERS_JS_SHARED",ws=class extends It{static getApiKey(e){return e&&typeof e!="string"&&_l.throwArgumentError("invalid apiKey","apiKey",e),e||x5}static getUrl(e,t){_l.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:_l.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var uc=new E(ke),dc="62e1ad51b37b8e00394bda3b",_s=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=dc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:uc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:uc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===dc}};var lc=new E(ke),b5=1;function pc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:b5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function g5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var ks=class extends Yt{constructor(e,t){e==null&&lc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=g5(e)):e.sendAsync?i=pc(e,e.sendAsync.bind(e)):e.send?i=pc(e,e.send.bind(e)):lc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var yc=new E(ke);function Zo(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Yt(n);case"ws":case"wss":return new ba(n);default:yc.throwArgumentError("unsupported URL scheme","network",n)}}let t=is(n);return(!t||!t._defaultProvider)&&yc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:gs,AlchemyProvider:vr,AnkrProvider:ms,CloudflareProvider:hs,EtherscanProvider:xs,InfuraProvider:_r,JsonRpcProvider:Yt,NodesmithProvider:ws,PocketProvider:_s,Web3Provider:ks,IpcProvider:null},e)}var te={};Vi(te,{AbiCoder:()=>$i,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>ge,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>sa,Interface:()=>Ca,LogDescription:()=>Zi,Logger:()=>E,ParamType:()=>pt,RLP:()=>$s,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>er,TransactionTypes:()=>Ao,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>uo,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>ll,_toEscapedUtf8String:()=>md,accessListify:()=>sn,arrayify:()=>j,base58:()=>pa,base64:()=>vd,checkProperties:()=>qi,checkResultErrors:()=>zi,commify:()=>Tc,computeAddress:()=>mn,computeHmac:()=>ya,computePublicKey:()=>Qr,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>zr,defaultPath:()=>fa,defineReadOnly:()=>B,dnsEncode:()=>Wr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>hd,formatEther:()=>vc,formatUnits:()=>kl,getAccountPath:()=>yf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ay,getIcapAddress:()=>ky,getJsonWalletAddress:()=>rl,getStatic:()=>ht,hashMessage:()=>Yi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Ce,hexStripZeros:()=>id,hexValue:()=>Fn,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>_y,isBytes:()=>on,isBytesLike:()=>na,isHexString:()=>ae,isValidMnemonic:()=>pf,isValidName:()=>_d,joinSignature:()=>Or,keccak256:()=>fe,mnemonicToEntropy:()=>fr,mnemonicToSeed:()=>Yd,namehash:()=>Ma,nameprep:()=>Td,parseBytes32String:()=>xd,parseEther:()=>wc,parseTransaction:()=>Eo,parseUnits:()=>Al,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>yi,recoverPublicKey:()=>ko,resolveProperties:()=>Ie,ripemd160:()=>Zr,serializeTransaction:()=>Xr,sha256:()=>Xt,sha512:()=>Jd,shallowCopy:()=>we,shuffled:()=>ns,solidityKeccak256:()=>mc,solidityPack:()=>eu,soliditySha256:()=>hc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>If,verifyTypedData:()=>Sf,zeroPad:()=>ii});var fc="solidity/5.7.0";var T5=new RegExp("^bytes([0-9]+)$"),v5=new RegExp("^(u?int)([0-9]*)$"),w5=new RegExp("^(.*)\\[([0-9]*)\\]$"),_5="0000000000000000000000000000000000000000000000000000000000000000",kr=new E(fc);function cc(n,e,t){switch(n){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let a=n.match(v5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&kr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(T5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&kr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&kr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+_5).substring(0,66)):e}if(a=n.match(w5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&kr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(cc(i,o,!0))}),ye(s)}return kr.throwArgumentError("invalid type","type",n)}function eu(n,e){n.length!=e.length&&kr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(cc(a,e[i]))}),K(ye(t))}function mc(n,e){return fe(eu(n,e))}function hc(n,e){return Xt(eu(n,e))}var xc="units/5.7.0";var bc=new E(xc),gc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Tc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&bc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function kl(n,e){if(typeof e=="string"){let t=gc.indexOf(e);t!==-1&&(e=3*t)}return Hi(n,e??18)}function Al(n,e){if(typeof n!="string"&&bc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=gc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function vc(n){return kl(n,18)}function wc(n){return Al(n,18)}var tu="ethers/5.7.2";var _c=new E(tu);try{let n=window;n._ethers==null&&(n._ethers=El)}catch{}var ga;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ga||(ga={}));var kc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(kc||(kc={}));var Ml;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(Ml||(Ml={}));var As;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(As||(As={}));var Cl;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(Cl||(Cl={}));var Es;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Es||(Es={}));var Il;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Il||(Il={}));var Sl;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Sl||(Sl={}));var Rl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Rl||(Rl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Nl="0x12345678",Pl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Pl||(Pl={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Dl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new te.Interface(Dl)}static connect(e,t){return new oe(e,Dl,t)}};xe(gi,"abi",Dl);var Ol=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new te.Interface(Ol)}static connect(e,t){return new oe(e,Ol,t)}};xe(Ti,"abi",Ol);var Ac=(n,e)=>{throw new Error(`${e}: ${n}`)},Bl=n=>n!=null;var{keccak256:A5,toUtf8Bytes:E5}=te,{MaxUint256:M5}=yt,Fl=(n,e)=>n.toLowerCase()===e.toLowerCase(),Ll=n=>te.formatEther(n);var Ul=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Bl)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return M5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},Oa=n=>A5(E5(n));var Ar=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),Vl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Bl);var{hexDataSlice:jl}=te,{MaxUint256:C5}=yt,Ec=n=>{let e=jl(n,0,3),t=F.from(jl(n,4,35)),a=F.from(jl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Mc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),C5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await vi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},I5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Mc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ea(n,e,t,a[0],i):I5(n,e,t,a,i):Mc(n,e,t,a,i);var{MaxUint256:Cc}=yt,{AddressZero:S5}=yt;async function R5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),nu(t)}catch{return[]}}async function Ms(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),I=gi.connect(r,a.signer||a.provider),_=await R5(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Cc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Cc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,S5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:P5}=yt,ta=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||ga.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||As[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ta.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ta.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return ta.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${P5}/noProof`,s=await ta.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Ic=10,dk=Et(Ic),Sc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Rc=Ic-1;var Pc=3,yk=Et(Pc),Nc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Dc=Pc-1;var Oc=10,mk=Et(Oc),Bc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Fc=Oc-1;var Lc=7,bk=Et(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[]},Vc=Lc-1;var jc=8,vk=Et(jc),Hc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},qc=jc-1;var Gc=5,kk=Et(Gc),zc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Kc=Gc-1;var Wc=7,Mk=Et(Wc),Jc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},$c=Wc-1;var Qc=10,Sk=Et(Qc),Xc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Yc=Qc-1;var Zc=14,Nk=Et(Zc),Hl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},ql=Zc-1;var em=18,N5=Et(em),Bk=em-1;var D5=(n,e)=>{switch(n){case Ae.FundingQueue:return Sc[e];case Ae.IVotingReputation:return Hl[e];case Ae.MultisigPermissions:return Nc[e];case Ae.OneTxPayment:return Bc[e];case Ae.ReputationBootstrapper:return Uc[e];case Ae.StagedExpenditure:return zc[e];case Ae.StakedExpenditure:return Hc[e];case Ae.StreamingPayments:return Jc[e];case Ae.TokenSupplier:return Xc[e];case Ae.VotingReputation:return Hl[e];default:return Ac(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=D5(n,e);return!!a&&!a.includes(t)};var O5={[Ae.FundingQueue]:Rc,[Ae.IVotingReputation]:ql,[Ae.MultisigPermissions]:Dc,[Ae.OneTxPayment]:Fc,[Ae.ReputationBootstrapper]:Vc,[Ae.StagedExpenditure]:Kc,[Ae.StakedExpenditure]:qc,[Ae.StreamingPayments]:$c,[Ae.TokenSupplier]:Yc,[Ae.VotingReputation]:ql};var w6=wn(tm(),1);var pp=wn(g6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var lp=2,dp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(dp||(dp={}));var T6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Jb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),yp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==lp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=T6(t.errors);throw new Error(a)};var v6=(n,e)=>{let t=n===Re.Colony?Jb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:lp});if(!a.success){let i=T6(a.errors);throw new Error(i)}return a.data};var fp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},cp=fp;var mp=(0,w6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Os={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},La=class{adapter;constructor(e){this.adapter=e||new cp}static eventSupportsMetadata(e){return!!Object.keys(Os).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await mp(a)).json();return yp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await mp(a)).json(),s=Object.entries(Os).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return yp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await mp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=v6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var sE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var hp=async(n,e)=>{let t=await n;return e.send("eth_getLogs",[t])},Bs=n=>n!=null;var Ua=class{ipfs;provider;constructor(e,t){this.ipfs=new La(t?.ipfsAdapter),this.provider=e}static extractSingleTopic(e){if(!e||!e.topics)return null;let t=e.topics;return typeof t[0]=="string"?t[0]:Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:null}createEventSource(e){return e.connect(yt.AddressZero,this.provider)}async getEvents(e){return(await hp(e,this.provider)).map(a=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,a.data,a.topics);return La.eventSupportsMetadata(r)?{...e,data:s,transactionHash:a.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:a.transactionHash,data:s}}).filter(Bs)}async getMultiEvents(e,t={}){let a=[].concat(e),i=Array.from(new Set(a.flatMap(({address:o})=>o))).filter(Bs),r=Array.from(new Set(a.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await hp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Ua.extractSingleTopic(o),p=a.find(({address:S,colonyTopics:L})=>S&&!Fl(S,o.address)?!1:L.findIndex(({topic:O})=>O===l)>-1);if(!p)return null;let f=p.colonyTopics.find(({topic:S})=>S===l);if(!f)return null;let{eventSource:x,eventName:I}=f,_=x.interface.decodeEventLog(I,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:I,data:_,transactionHash:o.transactionHash};return La.eventSupportsMetadata(I)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(I,_.metadata)}:v}).filter(Bs)}createFilter(e,t,a,i,r={}){let s=i?e.filters[t].apply([e.filters[t],...i]):e.filters[t]();return{eventSource:e,eventName:t,topics:s.topics,address:a,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,a){let i=t.map(r=>{let s=this.createFilter(e,r,a),o=Ua.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Bs);return{address:a,colonyTopics:i}}};var xp=[{anonymous:!1,inputs:[{indexed:!1,name:"colonyNetwork",type:"address"},{indexed:!1,name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"users",type:"address[]"},{indexed:!1,name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldVersion",type:"uint256"},{indexed:!1,name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!0,name:"domainId",type:"uint256"},{indexed:!0,name:"role",type:"uint8"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPot",type:"uint256"},{indexed:!0,name:"toPot",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"},{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"domainId",type:"uint256"}],name:"TaskDomainSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!0,name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fundingPotId",type:"uint256"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyFundingRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyAdministrationRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyArchitectureRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRootRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenPayout",type:"uint256"}],name:"PayoutClaimed",type:"event"}],Sr=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Sr,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(Tn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(vn,"abi",gp);var Tp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ci,"abi",Tp);var Bu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],_6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",Xb=n=>n.length>1,Pn=class extends ci{constructor(...e){Xb(e)?super(...e):super(Bu,_6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Bu)}static connect(e,t){return new oe(e,Bu,t)}};xe(Pn,"bytecode",_6),xe(Pn,"abi",Bu);var Rr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:t1}=yt;async function n1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var a1=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await n1(t)}catch{a=!1}try{await t.nonces(t1)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Rr.TokenClient,t},vp=a1;var{AddressZero:wp}=yt,r1=Tn.connect(wp,new Zn.BaseProvider(3656691)).interface,s1=Ci.connect(wp,new Zn.BaseProvider(3656691)).interface,o1=vn.connect(wp,new Zn.BaseProvider(3656691)).interface;var _p=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new te.Interface(_p)}static connect(e,t){return new oe(e,_p,t)}};Fs.abi=_p;var kp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Ls.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Pr.abi=Ap;var Ii=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Os[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:d1,solidityKeccak256:l1,splitSignature:p1}=te,Si=class extends Ii{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=l1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=d1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=p1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ie=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Fu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Ep=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var{AddressZero:b1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===b1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.OneTxPayment),t],async a=>({...ie("ExtensionUpgraded",a)}))}},Va=Dn;Va.supportedVersions=[{version:3,factory:Di},{version:4,factory:Oi},{version:5,factory:Bi}],Va.extensionType=Ae.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ie("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ie("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ie("Approval",a)}))}};var Us=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ie("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ie("LogSetOwner",a)}))}};var Vs=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ie("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Us(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var{AddressZero:Op}=yt;var Lu=F.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===Op)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ie("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ms(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Op,Nl);return[e,t,Op,Nl,a,i,r,s]},async t=>({...ie("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Fu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ll(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ie("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.VotingReputation),t],async a=>({...ie("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Bn;ja.supportedVersions=[{version:7,factory:Fi},{version:8,factory:Li},{version:9,factory:Ui}],ja.extensionType=Ae.VotingReputation;var w1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Ar(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ie("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ie("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ie("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ea(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ie("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=w1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Fu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return nu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ie("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ie("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ie("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ie("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ie("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},js=Dr;js.supportedVersions=[{version:11,factory:Ri},{version:12,factory:Pi},{version:13,factory:Ni}];var{splitSignature:gR}=te;var{namehash:LR}=te,{AddressZero:UR}=yt;var A1=new Zn.JsonRpcProvider(Es.ArbitrumOne),{isAddress:E1}=te,M1=(n,e)=>{let t=new Ua(A1),a=t.createEventSource(Sr),i=t.createMultiFilter(a,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],n),r=0;t.provider.on("block",async s=>{if(r+=1,r===4){let o=await t.getMultiEvents(i,{fromBlock:s-r,toBlock:s});o.length&&e(o),r=0}})},Fp=document.querySelector("#address"),E6=document.querySelector("#button"),Lp=document.querySelector("#error"),M6=document.querySelector("#result");if(!Fp||!E6||!Lp||!M6)throw new Error("Could not find all required HTML elements");var C1=n=>{Lp.innerText=n},I1=()=>{Lp.innerText=""},Bp=n=>{M6.innerText=n};E6.addEventListener("click",async()=>{I1();let n=Fp.value;return E1(n)?(Fp.value="",M1(n,e=>{Bp(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let a=await t.getMetadata();if(a.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=a.data;Bp(`A domain with id ${t.data.domainId} was created on Colony ${t.address}. It's name is ${i}, it's color ${r} and was created for the following purpose: ${s}`)}}})}),Bp(`Set up event listener for Colony ${n}`),null):C1("This is not a valid address")});})(); +`)}`,Jb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),yp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==lp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=T6(t.errors);throw new Error(a)};var v6=(n,e)=>{let t=n===Re.Colony?Jb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:lp});if(!a.success){let i=T6(a.errors);throw new Error(i)}return a.data};var fp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},cp=fp;var mp=(0,w6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Os={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},La=class{adapter;constructor(e){this.adapter=e||new cp}static eventSupportsMetadata(e){return!!Object.keys(Os).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await mp(a)).json();return yp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await mp(a)).json(),s=Object.entries(Os).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return yp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await mp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=v6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var sE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var hp=async(n,e)=>{let t=await n;return e.send("eth_getLogs",[t])},Bs=n=>n!=null;var Ua=class{ipfs;provider;constructor(e,t){this.ipfs=new La(t?.ipfsAdapter),this.provider=e}static extractSingleTopic(e){if(!e||!e.topics)return null;let t=e.topics;return typeof t[0]=="string"?t[0]:Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:null}createEventSource(e){return e.connect(yt.AddressZero,this.provider)}async getEvents(e){return(await hp(e,this.provider)).map(a=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,a.data,a.topics);return La.eventSupportsMetadata(r)?{...e,data:s,transactionHash:a.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:a.transactionHash,data:s}}).filter(Bs)}async getMultiEvents(e,t={}){let a=[].concat(e),i=Array.from(new Set(a.flatMap(({address:o})=>o))).filter(Bs),r=Array.from(new Set(a.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await hp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Ua.extractSingleTopic(o),p=a.find(({address:S,colonyTopics:L})=>S&&!Fl(S,o.address)?!1:L.findIndex(({topic:O})=>O===l)>-1);if(!p)return null;let f=p.colonyTopics.find(({topic:S})=>S===l);if(!f)return null;let{eventSource:x,eventName:I}=f,_=x.interface.decodeEventLog(I,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:I,data:_,transactionHash:o.transactionHash};return La.eventSupportsMetadata(I)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(I,_.metadata)}:v}).filter(Bs)}createFilter(e,t,a,i,r={}){let s=i?e.filters[t].apply([e.filters[t],...i]):e.filters[t]();return{eventSource:e,eventName:t,topics:s.topics,address:a,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,a){let i=t.map(r=>{let s=this.createFilter(e,r,a),o=Ua.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Bs);return{address:a,colonyTopics:i}}};var xp=[{anonymous:!1,inputs:[{indexed:!1,name:"colonyNetwork",type:"address"},{indexed:!1,name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"users",type:"address[]"},{indexed:!1,name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldVersion",type:"uint256"},{indexed:!1,name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!0,name:"domainId",type:"uint256"},{indexed:!0,name:"role",type:"uint8"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPot",type:"uint256"},{indexed:!0,name:"toPot",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardPayoutId",type:"uint256"},{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"fee",type:"uint256"},{indexed:!1,name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"domainId",type:"uint256"}],name:"TaskDomainSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!0,name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"},{indexed:!1,name:"role",type:"uint8"},{indexed:!1,name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fundingPotId",type:"uint256"},{indexed:!1,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"expenditureId",type:"uint256"},{indexed:!0,name:"slot",type:"uint256"},{indexed:!0,name:"token",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyFundingRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyAdministrationRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyArchitectureRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"user",type:"address"},{indexed:!1,name:"setTo",type:"bool"}],name:"ColonyRootRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenPayout",type:"uint256"}],name:"PayoutClaimed",type:"event"}],Sr=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Sr,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(Tn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(vn,"abi",gp);var Tp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new te.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ci,"abi",Tp);var Bu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],_6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",Xb=n=>n.length>1,Pn=class extends ci{constructor(...e){Xb(e)?super(...e):super(Bu,_6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Bu)}static connect(e,t){return new oe(e,Bu,t)}};xe(Pn,"bytecode",_6),xe(Pn,"abi",Bu);var Rr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:t1}=yt;async function n1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var a1=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await n1(t)}catch{a=!1}try{await t.nonces(t1)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Rr.TokenClient,t},vp=a1;var{AddressZero:wp}=yt,r1=Tn.connect(wp,new Zn.BaseProvider(3656691)).interface,s1=Ci.connect(wp,new Zn.BaseProvider(3656691)).interface,o1=vn.connect(wp,new Zn.BaseProvider(3656691)).interface;var _p=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new te.Interface(_p)}static connect(e,t){return new oe(e,_p,t)}};Fs.abi=_p;var kp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Ls.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Pr.abi=Ap;var Ii=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Os[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:d1,solidityKeccak256:l1,splitSignature:p1}=te,Si=class extends Ii{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=l1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=d1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=p1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ie=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Fu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Ep=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var{AddressZero:b1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===b1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.OneTxPayment),t],async a=>({...ie("ExtensionUpgraded",a)}))}},Va=Dn;Va.supportedVersions=[{version:3,factory:Di},{version:4,factory:Oi},{version:5,factory:Bi}],Va.extensionType=Ae.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ie("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ie("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ie("Approval",a)}))}};var Us=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ie("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ie("LogSetOwner",a)}))}};var Vs=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ie("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Us(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var{AddressZero:Op}=yt;var Lu=F.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===Op)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ie("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Ms(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Op,Nl);return[e,t,Op,Nl,a,i,r,s]},async t=>({...ie("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Fu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ll(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ea(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ie("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.VotingReputation),t],async a=>({...ie("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Bn;ja.supportedVersions=[{version:7,factory:Fi},{version:8,factory:Li},{version:9,factory:Ui}],ja.extensionType=Ae.VotingReputation;var w1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Ar(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ie("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ie("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ie("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ea(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ie("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=w1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Fu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return nu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ie("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ie("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ie("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ie("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ie("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},js=Dr;js.supportedVersions=[{version:11,factory:Ri},{version:12,factory:Pi},{version:13,factory:Ni}];var{splitSignature:gR}=te;var{namehash:LR}=te,{AddressZero:UR}=yt;var A1=new Zn.JsonRpcProvider(Es.ArbitrumOne),{isAddress:E1}=te,M1=(n,e)=>{let t=new Ua(A1),a=t.createEventSource(Sr),i=t.createMultiFilter(a,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],n),r=0;t.provider.on("block",async s=>{if(r+=1,r===4){let o=await t.getMultiEvents(i,{fromBlock:s-r,toBlock:s});o.length&&e(o),r=0}})},Fp=document.querySelector("#address"),E6=document.querySelector("#button"),Lp=document.querySelector("#error"),M6=document.querySelector("#result");if(!Fp||!E6||!Lp||!M6)throw new Error("Could not find all required HTML elements");var C1=n=>{Lp.innerText=n},I1=()=>{Lp.innerText=""},Bp=n=>{M6.innerText=n};E6.addEventListener("click",async()=>{I1();let n=Fp.value;return E1(n)?(Fp.value="",M1(n,e=>{Bp(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let a=await t.getMetadata();if(a.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=a.data;Bp(`A domain with id ${t.data.domainId} was created on Colony ${t.address}. It's name is ${i}, it's color ${r} and was created for the following purpose: ${s}`)}}})}),Bp(`Set up event listener for Colony ${n}`),null):C1("This is not a valid address")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/index.js b/index.js index 8531dccce..d353ecb00 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ "use strict";(()=>{var d6=Object.create;var Fs=Object.defineProperty;var l6=Object.getOwnPropertyDescriptor;var p6=Object.getOwnPropertyNames;var y6=Object.getPrototypeOf,f6=Object.prototype.hasOwnProperty;var c6=(n,e,t)=>e in n?Fs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var X=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Li=(n,e)=>{for(var t in e)Fs(n,t,{get:e[t],enumerable:!0})},m6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p6(e))!f6.call(n,i)&&i!==t&&Fs(n,i,{get:()=>e[i],enumerable:!(a=l6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?d6(y6(n)):{},m6(e||!n||!n.__esModule?Fs(t,"default",{value:n,enumerable:!0}):t,n));var me=(n,e,t)=>(c6(n,typeof e!="symbol"?e+"":e,t),t);var _p=X(()=>{});var $u=X((kp,Ju)=>{(function(n,e){"use strict";function t(E,u){if(!E)throw new Error(u||"Assertion failed")}function a(E,u){E.super_=u;var y=function(){};y.prototype=u.prototype,E.prototype=new y,E.prototype.constructor=E}function i(E,u,y){if(i.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(E||0,u||10,y||"be"))}typeof n=="object"?n.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=_p().Buffer}catch{}i.isBN=function(u){return u instanceof i?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===i.wordSize&&Array.isArray(u.words)},i.max=function(u,y){return u.cmp(y)>0?u:y},i.min=function(u,y){return u.cmp(y)<0?u:y},i.prototype._init=function(u,y,x){if(typeof u=="number")return this._initNumber(u,y,x);if(typeof u=="object")return this._initArray(u,y,x);y==="hex"&&(y=16),t(y===(y|0)&&y>=2&&y<=36),u=u.toString().replace(/\s+/g,"");var T=0;u[0]==="-"&&(T++,this.negative=1),T=0;T-=3)h=u[T]|u[T-1]<<8|u[T-2]<<16,this.words[_]|=h<>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);else if(x==="le")for(T=0,_=0;T>>26-w&67108863,w+=24,w>=26&&(w-=26,_++);return this._strip()};function s(E,u){var y=E.charCodeAt(u);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;t(!1,"Invalid character in "+E)}function o(E,u,y){var x=s(E,y);return y-1>=u&&(x|=s(E,y-1)<<4),x}i.prototype._parseHex=function(u,y,x){this.length=Math.ceil((u.length-y)/6),this.words=new Array(this.length);for(var T=0;T=y;T-=2)w=o(u,y,T)<<_,this.words[h]|=w&67108863,_>=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8;else{var g=u.length-y;for(T=g%2===0?y+1:y;T=18?(_-=18,h+=1,this.words[h]|=w>>>26):_+=8}this._strip()};function l(E,u,y,x){for(var T=0,_=0,h=Math.min(E.length,y),w=u;w=49?_=g-49+10:g>=17?_=g-17+10:_=g,t(g>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(u,y){u=u||10,y=y|0||1;var x;if(u===16||u==="hex"){x="";for(var T=0,_=0,h=0;h>>24-T&16777215,T+=2,T>=26&&(T-=26,h--),_!==0||h!==this.length-1?x=b[6-g.length]+g+x:x=g+x}for(_!==0&&(x=_.toString(16)+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(u===(u|0)&&u>=2&&u<=36){var d=M[u],m=k[u];x="";var L=this.clone();for(L.negative=0;!L.isZero();){var c=L.modrn(m).toString(u);L=L.idivn(m),L.isZero()?x=c+x:x=b[d-c.length]+c+x}for(this.isZero()&&(x="0"+x);x.length%y!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(u,y){return this.toArrayLike(r,u,y)}),i.prototype.toArray=function(u,y){return this.toArrayLike(Array,u,y)};var v=function(u,y){return u.allocUnsafe?u.allocUnsafe(y):new u(y)};i.prototype.toArrayLike=function(u,y,x){this._strip();var T=this.byteLength(),_=x||Math.max(1,T);t(T<=_,"byte array longer than desired length"),t(_>0,"Requested array length <= 0");var h=v(u,_),w=y==="le"?"LE":"BE";return this["_toArrayLike"+w](h,T),h},i.prototype._toArrayLikeLE=function(u,y){for(var x=0,T=0,_=0,h=0;_>8&255),x>16&255),h===6?(x>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(x=0&&(u[x--]=w>>8&255),x>=0&&(u[x--]=w>>16&255),h===6?(x>=0&&(u[x--]=w>>24&255),T=0,h=0):(T=w>>>24,h+=2)}if(x>=0)for(u[x--]=T;x>=0;)u[x--]=0},Math.clz32?i.prototype._countBits=function(u){return 32-Math.clz32(u)}:i.prototype._countBits=function(u){var y=u,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},i.prototype._zeroBits=function(u){if(u===0)return 26;var y=u,x=0;return(y&8191)===0&&(x+=13,y>>>=13),(y&127)===0&&(x+=7,y>>>=7),(y&15)===0&&(x+=4,y>>>=4),(y&3)===0&&(x+=2,y>>>=2),(y&1)===0&&x++,x},i.prototype.bitLength=function(){var u=this.words[this.length-1],y=this._countBits(u);return(this.length-1)*26+y};function C(E){for(var u=new Array(E.bitLength()),y=0;y>>T&1}return u}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,y=0;yu.length?this.clone().ior(u):u.clone().ior(this)},i.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},i.prototype.iuand=function(u){var y;this.length>u.length?y=u:y=this;for(var x=0;xu.length?this.clone().iand(u):u.clone().iand(this)},i.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},i.prototype.iuxor=function(u){var y,x;this.length>u.length?(y=this,x=u):(y=u,x=this);for(var T=0;Tu.length?this.clone().ixor(u):u.clone().ixor(this)},i.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},i.prototype.inotn=function(u){t(typeof u=="number"&&u>=0);var y=Math.ceil(u/26)|0,x=u%26;this._expand(y),x>0&&y--;for(var T=0;T0&&(this.words[T]=~this.words[T]&67108863>>26-x),this._strip()},i.prototype.notn=function(u){return this.clone().inotn(u)},i.prototype.setn=function(u,y){t(typeof u=="number"&&u>=0);var x=u/26|0,T=u%26;return this._expand(x+1),y?this.words[x]=this.words[x]|1<u.length?(x=this,T=u):(x=u,T=this);for(var _=0,h=0;h>>26;for(;_!==0&&h>>26;if(this.length=x.length,_!==0)this.words[this.length]=_,this.length++;else if(x!==this)for(;hu.length?this.clone().iadd(u):u.clone().iadd(this)},i.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var y=this.iadd(u);return u.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var x=this.cmp(u);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var T,_;x>0?(T=this,_=u):(T=u,_=this);for(var h=0,w=0;w<_.length;w++)y=(T.words[w]|0)-(_.words[w]|0)+h,h=y>>26,this.words[w]=y&67108863;for(;h!==0&&w>26,this.words[w]=y&67108863;if(h===0&&w>>26,L=g&67108863,c=Math.min(d,u.length-1),I=Math.max(0,d-E.length+1);I<=c;I++){var S=d-I|0;T=E.words[S]|0,_=u.words[I]|0,h=T*_+L,m+=h/67108864|0,L=h&67108863}y.words[d]=L|0,g=m|0}return g!==0?y.words[d]=g|0:y.length--,y._strip()}var N=function(u,y,x){var T=u.words,_=y.words,h=x.words,w=0,g,d,m,L=T[0]|0,c=L&8191,I=L>>>13,S=T[1]|0,O=S&8191,H=S>>>13,Q=T[2]|0,W=Q&8191,z=Q>>>13,yt=T[3]|0,$=yt&8191,se=yt>>>13,Va=T[4]|0,Pe=Va&8191,Ne=Va>>>13,ja=T[5]|0,De=ja&8191,Oe=ja>>>13,Ha=T[6]|0,Be=Ha&8191,Fe=Ha>>>13,qa=T[7]|0,Le=qa&8191,Ue=qa>>>13,Ga=T[8]|0,Ve=Ga&8191,je=Ga>>>13,za=T[9]|0,He=za&8191,qe=za>>>13,Ka=_[0]|0,Ge=Ka&8191,ze=Ka>>>13,Wa=_[1]|0,Ke=Wa&8191,We=Wa>>>13,Ja=_[2]|0,Je=Ja&8191,$e=Ja>>>13,$a=_[3]|0,Qe=$a&8191,Xe=$a>>>13,Qa=_[4]|0,Ye=Qa&8191,Ze=Qa>>>13,Xa=_[5]|0,et=Xa&8191,tt=Xa>>>13,Ya=_[6]|0,nt=Ya&8191,at=Ya>>>13,Za=_[7]|0,it=Za&8191,rt=Za>>>13,ei=_[8]|0,st=ei&8191,ot=ei>>>13,ti=_[9]|0,ut=ti&8191,dt=ti>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(c,Ge),d=Math.imul(c,ze),d=d+Math.imul(I,Ge)|0,m=Math.imul(I,ze);var ga=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(ga>>>26)|0,ga&=67108863,g=Math.imul(O,Ge),d=Math.imul(O,ze),d=d+Math.imul(H,Ge)|0,m=Math.imul(H,ze),g=g+Math.imul(c,Ke)|0,d=d+Math.imul(c,We)|0,d=d+Math.imul(I,Ke)|0,m=m+Math.imul(I,We)|0;var Ta=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(W,Ge),d=Math.imul(W,ze),d=d+Math.imul(z,Ge)|0,m=Math.imul(z,ze),g=g+Math.imul(O,Ke)|0,d=d+Math.imul(O,We)|0,d=d+Math.imul(H,Ke)|0,m=m+Math.imul(H,We)|0,g=g+Math.imul(c,Je)|0,d=d+Math.imul(c,$e)|0,d=d+Math.imul(I,Je)|0,m=m+Math.imul(I,$e)|0;var va=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(va>>>26)|0,va&=67108863,g=Math.imul($,Ge),d=Math.imul($,ze),d=d+Math.imul(se,Ge)|0,m=Math.imul(se,ze),g=g+Math.imul(W,Ke)|0,d=d+Math.imul(W,We)|0,d=d+Math.imul(z,Ke)|0,m=m+Math.imul(z,We)|0,g=g+Math.imul(O,Je)|0,d=d+Math.imul(O,$e)|0,d=d+Math.imul(H,Je)|0,m=m+Math.imul(H,$e)|0,g=g+Math.imul(c,Qe)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(I,Qe)|0,m=m+Math.imul(I,Xe)|0;var wa=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(wa>>>26)|0,wa&=67108863,g=Math.imul(Pe,Ge),d=Math.imul(Pe,ze),d=d+Math.imul(Ne,Ge)|0,m=Math.imul(Ne,ze),g=g+Math.imul($,Ke)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(se,Ke)|0,m=m+Math.imul(se,We)|0,g=g+Math.imul(W,Je)|0,d=d+Math.imul(W,$e)|0,d=d+Math.imul(z,Je)|0,m=m+Math.imul(z,$e)|0,g=g+Math.imul(O,Qe)|0,d=d+Math.imul(O,Xe)|0,d=d+Math.imul(H,Qe)|0,m=m+Math.imul(H,Xe)|0,g=g+Math.imul(c,Ye)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(I,Ye)|0,m=m+Math.imul(I,Ze)|0;var _a=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(_a>>>26)|0,_a&=67108863,g=Math.imul(De,Ge),d=Math.imul(De,ze),d=d+Math.imul(Oe,Ge)|0,m=Math.imul(Oe,ze),g=g+Math.imul(Pe,Ke)|0,d=d+Math.imul(Pe,We)|0,d=d+Math.imul(Ne,Ke)|0,m=m+Math.imul(Ne,We)|0,g=g+Math.imul($,Je)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(se,Je)|0,m=m+Math.imul(se,$e)|0,g=g+Math.imul(W,Qe)|0,d=d+Math.imul(W,Xe)|0,d=d+Math.imul(z,Qe)|0,m=m+Math.imul(z,Xe)|0,g=g+Math.imul(O,Ye)|0,d=d+Math.imul(O,Ze)|0,d=d+Math.imul(H,Ye)|0,m=m+Math.imul(H,Ze)|0,g=g+Math.imul(c,et)|0,d=d+Math.imul(c,tt)|0,d=d+Math.imul(I,et)|0,m=m+Math.imul(I,tt)|0;var Du=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Du>>>26)|0,Du&=67108863,g=Math.imul(Be,Ge),d=Math.imul(Be,ze),d=d+Math.imul(Fe,Ge)|0,m=Math.imul(Fe,ze),g=g+Math.imul(De,Ke)|0,d=d+Math.imul(De,We)|0,d=d+Math.imul(Oe,Ke)|0,m=m+Math.imul(Oe,We)|0,g=g+Math.imul(Pe,Je)|0,d=d+Math.imul(Pe,$e)|0,d=d+Math.imul(Ne,Je)|0,m=m+Math.imul(Ne,$e)|0,g=g+Math.imul($,Qe)|0,d=d+Math.imul($,Xe)|0,d=d+Math.imul(se,Qe)|0,m=m+Math.imul(se,Xe)|0,g=g+Math.imul(W,Ye)|0,d=d+Math.imul(W,Ze)|0,d=d+Math.imul(z,Ye)|0,m=m+Math.imul(z,Ze)|0,g=g+Math.imul(O,et)|0,d=d+Math.imul(O,tt)|0,d=d+Math.imul(H,et)|0,m=m+Math.imul(H,tt)|0,g=g+Math.imul(c,nt)|0,d=d+Math.imul(c,at)|0,d=d+Math.imul(I,nt)|0,m=m+Math.imul(I,at)|0;var Ou=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ou>>>26)|0,Ou&=67108863,g=Math.imul(Le,Ge),d=Math.imul(Le,ze),d=d+Math.imul(Ue,Ge)|0,m=Math.imul(Ue,ze),g=g+Math.imul(Be,Ke)|0,d=d+Math.imul(Be,We)|0,d=d+Math.imul(Fe,Ke)|0,m=m+Math.imul(Fe,We)|0,g=g+Math.imul(De,Je)|0,d=d+Math.imul(De,$e)|0,d=d+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,$e)|0,g=g+Math.imul(Pe,Qe)|0,d=d+Math.imul(Pe,Xe)|0,d=d+Math.imul(Ne,Qe)|0,m=m+Math.imul(Ne,Xe)|0,g=g+Math.imul($,Ye)|0,d=d+Math.imul($,Ze)|0,d=d+Math.imul(se,Ye)|0,m=m+Math.imul(se,Ze)|0,g=g+Math.imul(W,et)|0,d=d+Math.imul(W,tt)|0,d=d+Math.imul(z,et)|0,m=m+Math.imul(z,tt)|0,g=g+Math.imul(O,nt)|0,d=d+Math.imul(O,at)|0,d=d+Math.imul(H,nt)|0,m=m+Math.imul(H,at)|0,g=g+Math.imul(c,it)|0,d=d+Math.imul(c,rt)|0,d=d+Math.imul(I,it)|0,m=m+Math.imul(I,rt)|0;var Bu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Bu>>>26)|0,Bu&=67108863,g=Math.imul(Ve,Ge),d=Math.imul(Ve,ze),d=d+Math.imul(je,Ge)|0,m=Math.imul(je,ze),g=g+Math.imul(Le,Ke)|0,d=d+Math.imul(Le,We)|0,d=d+Math.imul(Ue,Ke)|0,m=m+Math.imul(Ue,We)|0,g=g+Math.imul(Be,Je)|0,d=d+Math.imul(Be,$e)|0,d=d+Math.imul(Fe,Je)|0,m=m+Math.imul(Fe,$e)|0,g=g+Math.imul(De,Qe)|0,d=d+Math.imul(De,Xe)|0,d=d+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,Xe)|0,g=g+Math.imul(Pe,Ye)|0,d=d+Math.imul(Pe,Ze)|0,d=d+Math.imul(Ne,Ye)|0,m=m+Math.imul(Ne,Ze)|0,g=g+Math.imul($,et)|0,d=d+Math.imul($,tt)|0,d=d+Math.imul(se,et)|0,m=m+Math.imul(se,tt)|0,g=g+Math.imul(W,nt)|0,d=d+Math.imul(W,at)|0,d=d+Math.imul(z,nt)|0,m=m+Math.imul(z,at)|0,g=g+Math.imul(O,it)|0,d=d+Math.imul(O,rt)|0,d=d+Math.imul(H,it)|0,m=m+Math.imul(H,rt)|0,g=g+Math.imul(c,st)|0,d=d+Math.imul(c,ot)|0,d=d+Math.imul(I,st)|0,m=m+Math.imul(I,ot)|0;var Fu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Fu>>>26)|0,Fu&=67108863,g=Math.imul(He,Ge),d=Math.imul(He,ze),d=d+Math.imul(qe,Ge)|0,m=Math.imul(qe,ze),g=g+Math.imul(Ve,Ke)|0,d=d+Math.imul(Ve,We)|0,d=d+Math.imul(je,Ke)|0,m=m+Math.imul(je,We)|0,g=g+Math.imul(Le,Je)|0,d=d+Math.imul(Le,$e)|0,d=d+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,$e)|0,g=g+Math.imul(Be,Qe)|0,d=d+Math.imul(Be,Xe)|0,d=d+Math.imul(Fe,Qe)|0,m=m+Math.imul(Fe,Xe)|0,g=g+Math.imul(De,Ye)|0,d=d+Math.imul(De,Ze)|0,d=d+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,Ze)|0,g=g+Math.imul(Pe,et)|0,d=d+Math.imul(Pe,tt)|0,d=d+Math.imul(Ne,et)|0,m=m+Math.imul(Ne,tt)|0,g=g+Math.imul($,nt)|0,d=d+Math.imul($,at)|0,d=d+Math.imul(se,nt)|0,m=m+Math.imul(se,at)|0,g=g+Math.imul(W,it)|0,d=d+Math.imul(W,rt)|0,d=d+Math.imul(z,it)|0,m=m+Math.imul(z,rt)|0,g=g+Math.imul(O,st)|0,d=d+Math.imul(O,ot)|0,d=d+Math.imul(H,st)|0,m=m+Math.imul(H,ot)|0,g=g+Math.imul(c,ut)|0,d=d+Math.imul(c,dt)|0,d=d+Math.imul(I,ut)|0,m=m+Math.imul(I,dt)|0;var Lu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,g=Math.imul(He,Ke),d=Math.imul(He,We),d=d+Math.imul(qe,Ke)|0,m=Math.imul(qe,We),g=g+Math.imul(Ve,Je)|0,d=d+Math.imul(Ve,$e)|0,d=d+Math.imul(je,Je)|0,m=m+Math.imul(je,$e)|0,g=g+Math.imul(Le,Qe)|0,d=d+Math.imul(Le,Xe)|0,d=d+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,Xe)|0,g=g+Math.imul(Be,Ye)|0,d=d+Math.imul(Be,Ze)|0,d=d+Math.imul(Fe,Ye)|0,m=m+Math.imul(Fe,Ze)|0,g=g+Math.imul(De,et)|0,d=d+Math.imul(De,tt)|0,d=d+Math.imul(Oe,et)|0,m=m+Math.imul(Oe,tt)|0,g=g+Math.imul(Pe,nt)|0,d=d+Math.imul(Pe,at)|0,d=d+Math.imul(Ne,nt)|0,m=m+Math.imul(Ne,at)|0,g=g+Math.imul($,it)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(se,it)|0,m=m+Math.imul(se,rt)|0,g=g+Math.imul(W,st)|0,d=d+Math.imul(W,ot)|0,d=d+Math.imul(z,st)|0,m=m+Math.imul(z,ot)|0,g=g+Math.imul(O,ut)|0,d=d+Math.imul(O,dt)|0,d=d+Math.imul(H,ut)|0,m=m+Math.imul(H,dt)|0;var Uu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,g=Math.imul(He,Je),d=Math.imul(He,$e),d=d+Math.imul(qe,Je)|0,m=Math.imul(qe,$e),g=g+Math.imul(Ve,Qe)|0,d=d+Math.imul(Ve,Xe)|0,d=d+Math.imul(je,Qe)|0,m=m+Math.imul(je,Xe)|0,g=g+Math.imul(Le,Ye)|0,d=d+Math.imul(Le,Ze)|0,d=d+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,Ze)|0,g=g+Math.imul(Be,et)|0,d=d+Math.imul(Be,tt)|0,d=d+Math.imul(Fe,et)|0,m=m+Math.imul(Fe,tt)|0,g=g+Math.imul(De,nt)|0,d=d+Math.imul(De,at)|0,d=d+Math.imul(Oe,nt)|0,m=m+Math.imul(Oe,at)|0,g=g+Math.imul(Pe,it)|0,d=d+Math.imul(Pe,rt)|0,d=d+Math.imul(Ne,it)|0,m=m+Math.imul(Ne,rt)|0,g=g+Math.imul($,st)|0,d=d+Math.imul($,ot)|0,d=d+Math.imul(se,st)|0,m=m+Math.imul(se,ot)|0,g=g+Math.imul(W,ut)|0,d=d+Math.imul(W,dt)|0,d=d+Math.imul(z,ut)|0,m=m+Math.imul(z,dt)|0;var Vu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(He,Qe),d=Math.imul(He,Xe),d=d+Math.imul(qe,Qe)|0,m=Math.imul(qe,Xe),g=g+Math.imul(Ve,Ye)|0,d=d+Math.imul(Ve,Ze)|0,d=d+Math.imul(je,Ye)|0,m=m+Math.imul(je,Ze)|0,g=g+Math.imul(Le,et)|0,d=d+Math.imul(Le,tt)|0,d=d+Math.imul(Ue,et)|0,m=m+Math.imul(Ue,tt)|0,g=g+Math.imul(Be,nt)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,at)|0,g=g+Math.imul(De,it)|0,d=d+Math.imul(De,rt)|0,d=d+Math.imul(Oe,it)|0,m=m+Math.imul(Oe,rt)|0,g=g+Math.imul(Pe,st)|0,d=d+Math.imul(Pe,ot)|0,d=d+Math.imul(Ne,st)|0,m=m+Math.imul(Ne,ot)|0,g=g+Math.imul($,ut)|0,d=d+Math.imul($,dt)|0,d=d+Math.imul(se,ut)|0,m=m+Math.imul(se,dt)|0;var ju=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(ju>>>26)|0,ju&=67108863,g=Math.imul(He,Ye),d=Math.imul(He,Ze),d=d+Math.imul(qe,Ye)|0,m=Math.imul(qe,Ze),g=g+Math.imul(Ve,et)|0,d=d+Math.imul(Ve,tt)|0,d=d+Math.imul(je,et)|0,m=m+Math.imul(je,tt)|0,g=g+Math.imul(Le,nt)|0,d=d+Math.imul(Le,at)|0,d=d+Math.imul(Ue,nt)|0,m=m+Math.imul(Ue,at)|0,g=g+Math.imul(Be,it)|0,d=d+Math.imul(Be,rt)|0,d=d+Math.imul(Fe,it)|0,m=m+Math.imul(Fe,rt)|0,g=g+Math.imul(De,st)|0,d=d+Math.imul(De,ot)|0,d=d+Math.imul(Oe,st)|0,m=m+Math.imul(Oe,ot)|0,g=g+Math.imul(Pe,ut)|0,d=d+Math.imul(Pe,dt)|0,d=d+Math.imul(Ne,ut)|0,m=m+Math.imul(Ne,dt)|0;var Hu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(He,et),d=Math.imul(He,tt),d=d+Math.imul(qe,et)|0,m=Math.imul(qe,tt),g=g+Math.imul(Ve,nt)|0,d=d+Math.imul(Ve,at)|0,d=d+Math.imul(je,nt)|0,m=m+Math.imul(je,at)|0,g=g+Math.imul(Le,it)|0,d=d+Math.imul(Le,rt)|0,d=d+Math.imul(Ue,it)|0,m=m+Math.imul(Ue,rt)|0,g=g+Math.imul(Be,st)|0,d=d+Math.imul(Be,ot)|0,d=d+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,ot)|0,g=g+Math.imul(De,ut)|0,d=d+Math.imul(De,dt)|0,d=d+Math.imul(Oe,ut)|0,m=m+Math.imul(Oe,dt)|0;var qu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(qu>>>26)|0,qu&=67108863,g=Math.imul(He,nt),d=Math.imul(He,at),d=d+Math.imul(qe,nt)|0,m=Math.imul(qe,at),g=g+Math.imul(Ve,it)|0,d=d+Math.imul(Ve,rt)|0,d=d+Math.imul(je,it)|0,m=m+Math.imul(je,rt)|0,g=g+Math.imul(Le,st)|0,d=d+Math.imul(Le,ot)|0,d=d+Math.imul(Ue,st)|0,m=m+Math.imul(Ue,ot)|0,g=g+Math.imul(Be,ut)|0,d=d+Math.imul(Be,dt)|0,d=d+Math.imul(Fe,ut)|0,m=m+Math.imul(Fe,dt)|0;var Gu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=67108863,g=Math.imul(He,it),d=Math.imul(He,rt),d=d+Math.imul(qe,it)|0,m=Math.imul(qe,rt),g=g+Math.imul(Ve,st)|0,d=d+Math.imul(Ve,ot)|0,d=d+Math.imul(je,st)|0,m=m+Math.imul(je,ot)|0,g=g+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(Ue,ut)|0,m=m+Math.imul(Ue,dt)|0;var zu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(He,st),d=Math.imul(He,ot),d=d+Math.imul(qe,st)|0,m=Math.imul(qe,ot),g=g+Math.imul(Ve,ut)|0,d=d+Math.imul(Ve,dt)|0,d=d+Math.imul(je,ut)|0,m=m+Math.imul(je,dt)|0;var Ku=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(He,ut),d=Math.imul(He,dt),d=d+Math.imul(qe,ut)|0,m=Math.imul(qe,dt);var Wu=(w+g|0)+((d&8191)<<13)|0;return w=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,h[0]=ga,h[1]=Ta,h[2]=va,h[3]=wa,h[4]=_a,h[5]=Du,h[6]=Ou,h[7]=Bu,h[8]=Fu,h[9]=Lu,h[10]=Uu,h[11]=Vu,h[12]=ju,h[13]=Hu,h[14]=qu,h[15]=Gu,h[16]=zu,h[17]=Ku,h[18]=Wu,w!==0&&(h[19]=w,x.length++),x};Math.imul||(N=D);function F(E,u,y){y.negative=u.negative^E.negative,y.length=E.length+u.length;for(var x=0,T=0,_=0;_>>26)|0,T+=h>>>26,h&=67108863}y.words[_]=w,x=h,h=T}return x!==0?y.words[_]=x:y.length--,y._strip()}function U(E,u,y){return F(E,u,y)}i.prototype.mulTo=function(u,y){var x,T=this.length+u.length;return this.length===10&&u.length===10?x=N(this,u,y):T<63?x=D(this,u,y):T<1024?x=F(this,u,y):x=U(this,u,y),x};function G(E,u){this.x=E,this.y=u}G.prototype.makeRBT=function(u){for(var y=new Array(u),x=i.prototype._countBits(u)-1,T=0;T>=1;return T},G.prototype.permute=function(u,y,x,T,_,h){for(var w=0;w>>1)_++;return 1<<_+1+T},G.prototype.conjugate=function(u,y,x){if(!(x<=1))for(var T=0;T>>13,x[2*h+1]=_&8191,_=_>>>13;for(h=2*y;h>=26,x+=_/67108864|0,x+=h>>>26,this.words[T]=h&67108863}return x!==0&&(this.words[T]=x,this.length++),y?this.ineg():this},i.prototype.muln=function(u){return this.clone().imuln(u)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(u){var y=C(u);if(y.length===0)return new i(1);for(var x=this,T=0;T=0);var y=u%26,x=(u-y)/26,T=67108863>>>26-y<<26-y,_;if(y!==0){var h=0;for(_=0;_>>26-y}h&&(this.words[_]=h,this.length++)}if(x!==0){for(_=this.length-1;_>=0;_--)this.words[_+x]=this.words[_];for(_=0;_=0);var T;y?T=(y-y%26)/26:T=0;var _=u%26,h=Math.min((u-_)/26,this.length),w=67108863^67108863>>>_<<_,g=x;if(T-=h,T=Math.max(0,T),g){for(var d=0;dh)for(this.length-=h,d=0;d=0&&(m!==0||d>=T);d--){var L=this.words[d]|0;this.words[d]=m<<26-_|L>>>_,m=L&w}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(u,y,x){return t(this.negative===0),this.iushrn(u,y,x)},i.prototype.shln=function(u){return this.clone().ishln(u)},i.prototype.ushln=function(u){return this.clone().iushln(u)},i.prototype.shrn=function(u){return this.clone().ishrn(u)},i.prototype.ushrn=function(u){return this.clone().iushrn(u)},i.prototype.testn=function(u){t(typeof u=="number"&&u>=0);var y=u%26,x=(u-y)/26,T=1<=0);var y=u%26,x=(u-y)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var T=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(u){if(t(typeof u=="number"),t(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(g/67108864|0),this.words[_+x]=h&67108863}for(;_>26,this.words[_+x]=h&67108863;if(w===0)return this._strip();for(t(w===-1),w=0,_=0;_>26,this.words[_]=h&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(u,y){var x=this.length-u.length,T=this.clone(),_=u,h=_.words[_.length-1]|0,w=this._countBits(h);x=26-w,x!==0&&(_=_.ushln(x),T.iushln(x),h=_.words[_.length-1]|0);var g=T.length-_.length,d;if(y!=="mod"){d=new i(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m=0;c--){var I=(T.words[_.length+c]|0)*67108864+(T.words[_.length+c-1]|0);for(I=Math.min(I/h|0,67108863),T._ishlnsubmul(_,I,c);T.negative!==0;)I--,T.negative=0,T._ishlnsubmul(_,1,c),T.isZero()||(T.negative^=1);d&&(d.words[c]=I)}return d&&d._strip(),T._strip(),y!=="div"&&x!==0&&T.iushrn(x),{div:d||null,mod:T}},i.prototype.divmod=function(u,y,x){if(t(!u.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var T,_,h;return this.negative!==0&&u.negative===0?(h=this.neg().divmod(u,y),y!=="mod"&&(T=h.div.neg()),y!=="div"&&(_=h.mod.neg(),x&&_.negative!==0&&_.iadd(u)),{div:T,mod:_}):this.negative===0&&u.negative!==0?(h=this.divmod(u.neg(),y),y!=="mod"&&(T=h.div.neg()),{div:T,mod:h.mod}):(this.negative&u.negative)!==0?(h=this.neg().divmod(u.neg(),y),y!=="div"&&(_=h.mod.neg(),x&&_.negative!==0&&_.isub(u)),{div:h.div,mod:_}):u.length>this.length||this.cmp(u)<0?{div:new i(0),mod:this}:u.length===1?y==="div"?{div:this.divn(u.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new i(this.modrn(u.words[0]))}:this._wordDiv(u,y)},i.prototype.div=function(u){return this.divmod(u,"div",!1).div},i.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},i.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},i.prototype.divRound=function(u){var y=this.divmod(u);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(u):y.mod,T=u.ushrn(1),_=u.andln(1),h=x.cmp(T);return h<0||_===1&&h===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modrn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=(1<<26)%u,T=0,_=this.length-1;_>=0;_--)T=(x*T+(this.words[_]|0))%u;return y?-T:T},i.prototype.modn=function(u){return this.modrn(u)},i.prototype.idivn=function(u){var y=u<0;y&&(u=-u),t(u<=67108863);for(var x=0,T=this.length-1;T>=0;T--){var _=(this.words[T]|0)+x*67108864;this.words[T]=_/u|0,x=_%u}return this._strip(),y?this.ineg():this},i.prototype.divn=function(u){return this.clone().idivn(u)},i.prototype.egcd=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new i(1),_=new i(0),h=new i(0),w=new i(1),g=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++g;for(var d=x.clone(),m=y.clone();!y.isZero();){for(var L=0,c=1;(y.words[0]&c)===0&&L<26;++L,c<<=1);if(L>0)for(y.iushrn(L);L-- >0;)(T.isOdd()||_.isOdd())&&(T.iadd(d),_.isub(m)),T.iushrn(1),_.iushrn(1);for(var I=0,S=1;(x.words[0]&S)===0&&I<26;++I,S<<=1);if(I>0)for(x.iushrn(I);I-- >0;)(h.isOdd()||w.isOdd())&&(h.iadd(d),w.isub(m)),h.iushrn(1),w.iushrn(1);y.cmp(x)>=0?(y.isub(x),T.isub(h),_.isub(w)):(x.isub(y),h.isub(T),w.isub(_))}return{a:h,b:w,gcd:x.iushln(g)}},i.prototype._invmp=function(u){t(u.negative===0),t(!u.isZero());var y=this,x=u.clone();y.negative!==0?y=y.umod(u):y=y.clone();for(var T=new i(1),_=new i(0),h=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var w=0,g=1;(y.words[0]&g)===0&&w<26;++w,g<<=1);if(w>0)for(y.iushrn(w);w-- >0;)T.isOdd()&&T.iadd(h),T.iushrn(1);for(var d=0,m=1;(x.words[0]&m)===0&&d<26;++d,m<<=1);if(d>0)for(x.iushrn(d);d-- >0;)_.isOdd()&&_.iadd(h),_.iushrn(1);y.cmp(x)>=0?(y.isub(x),T.isub(_)):(x.isub(y),_.isub(T))}var L;return y.cmpn(1)===0?L=T:L=_,L.cmpn(0)<0&&L.iadd(u),L},i.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var y=this.clone(),x=u.clone();y.negative=0,x.negative=0;for(var T=0;y.isEven()&&x.isEven();T++)y.iushrn(1),x.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var _=y.cmp(x);if(_<0){var h=y;y=x,x=h}else if(_===0||x.cmpn(1)===0)break;y.isub(x)}while(!0);return x.iushln(T)},i.prototype.invm=function(u){return this.egcd(u).a.umod(u)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(u){return this.words[0]&u},i.prototype.bincn=function(u){t(typeof u=="number");var y=u%26,x=(u-y)/26,T=1<>>26,w&=67108863,this.words[h]=w}return _!==0&&(this.words[h]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(u){var y=u<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var x;if(this.length>1)x=1;else{y&&(u=-u),t(u<=67108863,"Number is too big");var T=this.words[0]|0;x=T===u?0:Tu.length)return 1;if(this.length=0;x--){var T=this.words[x]|0,_=u.words[x]|0;if(T!==_){T<_?y=-1:T>_&&(y=1);break}}return y},i.prototype.gtn=function(u){return this.cmpn(u)===1},i.prototype.gt=function(u){return this.cmp(u)===1},i.prototype.gten=function(u){return this.cmpn(u)>=0},i.prototype.gte=function(u){return this.cmp(u)>=0},i.prototype.ltn=function(u){return this.cmpn(u)===-1},i.prototype.lt=function(u){return this.cmp(u)===-1},i.prototype.lten=function(u){return this.cmpn(u)<=0},i.prototype.lte=function(u){return this.cmp(u)<=0},i.prototype.eqn=function(u){return this.cmpn(u)===0},i.prototype.eq=function(u){return this.cmp(u)===0},i.red=function(u){return new ie(u)},i.prototype.toRed=function(u){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(u){return this.red=u,this},i.prototype.forceRed=function(u){return t(!this.red,"Already a number in reduction context"),this._forceRed(u)},i.prototype.redAdd=function(u){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},i.prototype.redIAdd=function(u){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},i.prototype.redSub=function(u){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},i.prototype.redISub=function(u){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},i.prototype.redShl=function(u){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},i.prototype.redMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},i.prototype.redIMul=function(u){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(u){return t(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function K(E,u){this.name=E,this.p=new i(u,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},K.prototype.ireduce=function(u){var y=u,x;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),x=y.bitLength();while(x>this.n);var T=x0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},K.prototype.split=function(u,y){u.iushrn(this.n,0,y)},K.prototype.imulK=function(u){return u.imul(this.k)};function ye(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(ye,K),ye.prototype.split=function(u,y){for(var x=4194303,T=Math.min(u.length,9),_=0;_>>22,h=w}h>>>=22,u.words[_-10]=h,h===0&&u.length>10?u.length-=10:u.length-=9},ye.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var y=0,x=0;x>>=26,u.words[x]=_,y=T}return y!==0&&(u.words[u.length++]=y),u},i._prime=function(u){if(q[u])return q[u];var y;if(u==="k256")y=new ye;else if(u==="p224")y=new te;else if(u==="p192")y=new ae;else if(u==="p25519")y=new Re;else throw new Error("Unknown prime "+u);return q[u]=y,y};function ie(E){if(typeof E=="string"){var u=i._prime(E);this.m=u.p,this.prime=u}else t(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}ie.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},ie.prototype._verify2=function(u,y){t((u.negative|y.negative)===0,"red works only with positives"),t(u.red&&u.red===y.red,"red works only with red numbers")},ie.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},ie.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},ie.prototype.add=function(u,y){this._verify2(u,y);var x=u.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},ie.prototype.iadd=function(u,y){this._verify2(u,y);var x=u.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},ie.prototype.sub=function(u,y){this._verify2(u,y);var x=u.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},ie.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},ie.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},ie.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},ie.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},ie.prototype.isqr=function(u){return this.imul(u,u.clone())},ie.prototype.sqr=function(u){return this.mul(u,u)},ie.prototype.sqrt=function(u){if(u.isZero())return u.clone();var y=this.m.andln(3);if(t(y%2===1),y===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(u,x)}for(var T=this.m.subn(1),_=0;!T.isZero()&&T.andln(1)===0;)_++,T.iushrn(1);t(!T.isZero());var h=new i(1).toRed(this),w=h.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new i(2*d*d).toRed(this);this.pow(d,g).cmp(w)!==0;)d.redIAdd(w);for(var m=this.pow(d,T),L=this.pow(u,T.addn(1).iushrn(1)),c=this.pow(u,T),I=_;c.cmp(h)!==0;){for(var S=c,O=0;S.cmp(h)!==0;O++)S=S.redSqr();t(O=0;_--){for(var m=y.words[_],L=d-1;L>=0;L--){var c=m>>L&1;if(h!==T[0]&&(h=this.sqr(h)),c===0&&w===0){g=0;continue}w<<=1,w|=c,g++,!(g!==x&&(_!==0||L!==0))&&(h=this.mul(h,T[w]),g=0,w=0)}d=26}return h},ie.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},ie.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new we(u)};function we(E){ie.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(we,ie),we.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},we.prototype.convertFrom=function(u){var y=this.imod(u.mul(this.rinv));return y.red=null,y},we.prototype.imul=function(u,y){if(u.isZero()||y.isZero())return u.words[0]=0,u.length=1,u;var x=u.imul(y),T=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=x.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},we.prototype.mul=function(u,y){if(u.isZero()||y.isZero())return new i(0)._forceRed(this);var x=u.mul(y),T=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=x.isub(T).iushrn(this.shift),h=_;return _.cmp(this.m)>=0?h=_.isub(this.m):_.cmpn(0)<0&&(h=_.iadd(this.m)),h._forceRed(this)},we.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof Ju>"u"||Ju,kp)});var $p=X((X1,qs)=>{(function(){"use strict";var n="input is invalid type",e="finalize already called",t=typeof window=="object",a=t?window:{};a.JS_SHA3_NO_WINDOW&&(t=!1);var i=!t&&typeof self=="object",r=!a.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r?a=global:i&&(a=self);var s=!a.JS_SHA3_NO_COMMON_JS&&typeof qs=="object"&&qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],M=[1,256,65536,16777216],k=[6,1536,393216,100663296],v=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],D=[224,256,384,512],N=[128,256],F=["hex","buffer","arrayBuffer","array","digest"],U={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var G=function(c,I,S){return function(O){return new d(c,I,c).update(O)[S]()}},q=function(c,I,S){return function(O,H){return new d(c,I,H).update(O)[S]()}},K=function(c,I,S){return function(O,H,Q,W){return u["cshake"+c].update(O,H,Q,W)[S]()}},ye=function(c,I,S){return function(O,H,Q,W){return u["kmac"+c].update(O,H,Q,W)[S]()}},te=function(c,I,S,O){for(var H=0;H>5,this.byteCount=this.blockCount<<2,this.outputBlocks=S>>5,this.extraBytes=(S&31)>>3;for(var O=0;O<50;++O)this.s[O]=0}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}for(var O=this.blocks,H=this.byteCount,Q=c.length,W=this.blockCount,z=0,yt=this.s,$,se;z>2]|=c[z]<>2]|=se<>2]|=(192|se>>6)<>2]|=(128|se&63)<=57344?(O[$>>2]|=(224|se>>12)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<>2]|=(240|se>>18)<>2]|=(128|se>>12&63)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<=H){for(this.start=$-H,this.block=O[W],$=0;$>8,S=c&255;S>0;)H.unshift(S),c=c>>8,S=c&255,++O;return I?H.push(O):H.unshift(O),this.update(H),H.length},d.prototype.encodeString=function(c){var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}var O=0,H=c.length;if(I)O=H;else for(var Q=0;Q=57344?O+=3:(W=65536+((W&1023)<<10|c.charCodeAt(++Q)&1023),O+=4)}return O+=this.encode(O*8),this.update(c),O},d.prototype.bytepad=function(c,I){for(var S=this.encode(I),O=0;O>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(c[0]=c[S],I=1;I>4&15]+p[z&15]+p[z>>12&15]+p[z>>8&15]+p[z>>20&15]+p[z>>16&15]+p[z>>28&15]+p[z>>24&15];Q%c===0&&(L(I),H=0)}return O&&(z=I[H],W+=p[z>>4&15]+p[z&15],O>1&&(W+=p[z>>12&15]+p[z>>8&15]),O>2&&(W+=p[z>>20&15]+p[z>>16&15])),W},d.prototype.arrayBuffer=function(){this.finalize();var c=this.blockCount,I=this.s,S=this.outputBlocks,O=this.extraBytes,H=0,Q=0,W=this.outputBits>>3,z;O?z=new ArrayBuffer(S+1<<2):z=new ArrayBuffer(W);for(var yt=new Uint32Array(z);Q>8&255,W[z+2]=yt>>16&255,W[z+3]=yt>>24&255;Q%c===0&&L(I)}return O&&(z=Q<<2,yt=I[H],W[z]=yt&255,O>1&&(W[z+1]=yt>>8&255),O>2&&(W[z+2]=yt>>16&255)),W};function m(c,I,S){d.call(this,c,I,S)}m.prototype=new d,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var L=function(c){var I,S,O,H,Q,W,z,yt,$,se,Va,Pe,Ne,ja,De,Oe,Ha,Be,Fe,qa,Le,Ue,Ga,Ve,je,za,He,qe,Ka,Ge,ze,Wa,Ke,We,Ja,Je,$e,$a,Qe,Xe,Qa,Ye,Ze,Xa,et,tt,Ya,nt,at,Za,it,rt,ei,st,ot,ti,ut,dt,ga,Ta,va,wa,_a;for(O=0;O<48;O+=2)H=c[0]^c[10]^c[20]^c[30]^c[40],Q=c[1]^c[11]^c[21]^c[31]^c[41],W=c[2]^c[12]^c[22]^c[32]^c[42],z=c[3]^c[13]^c[23]^c[33]^c[43],yt=c[4]^c[14]^c[24]^c[34]^c[44],$=c[5]^c[15]^c[25]^c[35]^c[45],se=c[6]^c[16]^c[26]^c[36]^c[46],Va=c[7]^c[17]^c[27]^c[37]^c[47],Pe=c[8]^c[18]^c[28]^c[38]^c[48],Ne=c[9]^c[19]^c[29]^c[39]^c[49],I=Pe^(W<<1|z>>>31),S=Ne^(z<<1|W>>>31),c[0]^=I,c[1]^=S,c[10]^=I,c[11]^=S,c[20]^=I,c[21]^=S,c[30]^=I,c[31]^=S,c[40]^=I,c[41]^=S,I=H^(yt<<1|$>>>31),S=Q^($<<1|yt>>>31),c[2]^=I,c[3]^=S,c[12]^=I,c[13]^=S,c[22]^=I,c[23]^=S,c[32]^=I,c[33]^=S,c[42]^=I,c[43]^=S,I=W^(se<<1|Va>>>31),S=z^(Va<<1|se>>>31),c[4]^=I,c[5]^=S,c[14]^=I,c[15]^=S,c[24]^=I,c[25]^=S,c[34]^=I,c[35]^=S,c[44]^=I,c[45]^=S,I=yt^(Pe<<1|Ne>>>31),S=$^(Ne<<1|Pe>>>31),c[6]^=I,c[7]^=S,c[16]^=I,c[17]^=S,c[26]^=I,c[27]^=S,c[36]^=I,c[37]^=S,c[46]^=I,c[47]^=S,I=se^(H<<1|Q>>>31),S=Va^(Q<<1|H>>>31),c[8]^=I,c[9]^=S,c[18]^=I,c[19]^=S,c[28]^=I,c[29]^=S,c[38]^=I,c[39]^=S,c[48]^=I,c[49]^=S,ja=c[0],De=c[1],tt=c[11]<<4|c[10]>>>28,Ya=c[10]<<4|c[11]>>>28,qe=c[20]<<3|c[21]>>>29,Ka=c[21]<<3|c[20]>>>29,Ta=c[31]<<9|c[30]>>>23,va=c[30]<<9|c[31]>>>23,Ye=c[40]<<18|c[41]>>>14,Ze=c[41]<<18|c[40]>>>14,We=c[2]<<1|c[3]>>>31,Ja=c[3]<<1|c[2]>>>31,Oe=c[13]<<12|c[12]>>>20,Ha=c[12]<<12|c[13]>>>20,nt=c[22]<<10|c[23]>>>22,at=c[23]<<10|c[22]>>>22,Ge=c[33]<<13|c[32]>>>19,ze=c[32]<<13|c[33]>>>19,wa=c[42]<<2|c[43]>>>30,_a=c[43]<<2|c[42]>>>30,st=c[5]<<30|c[4]>>>2,ot=c[4]<<30|c[5]>>>2,Je=c[14]<<6|c[15]>>>26,$e=c[15]<<6|c[14]>>>26,Be=c[25]<<11|c[24]>>>21,Fe=c[24]<<11|c[25]>>>21,Za=c[34]<<15|c[35]>>>17,it=c[35]<<15|c[34]>>>17,Wa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,Ve=c[6]<<28|c[7]>>>4,je=c[7]<<28|c[6]>>>4,ti=c[17]<<23|c[16]>>>9,ut=c[16]<<23|c[17]>>>9,$a=c[26]<<25|c[27]>>>7,Qe=c[27]<<25|c[26]>>>7,qa=c[36]<<21|c[37]>>>11,Le=c[37]<<21|c[36]>>>11,rt=c[47]<<24|c[46]>>>8,ei=c[46]<<24|c[47]>>>8,Xa=c[8]<<27|c[9]>>>5,et=c[9]<<27|c[8]>>>5,za=c[18]<<20|c[19]>>>12,He=c[19]<<20|c[18]>>>12,dt=c[29]<<7|c[28]>>>25,ga=c[28]<<7|c[29]>>>25,Xe=c[38]<<8|c[39]>>>24,Qa=c[39]<<8|c[38]>>>24,Ue=c[48]<<14|c[49]>>>18,Ga=c[49]<<14|c[48]>>>18,c[0]=ja^~Oe&Be,c[1]=De^~Ha&Fe,c[10]=Ve^~za&qe,c[11]=je^~He&Ka,c[20]=We^~Je&$a,c[21]=Ja^~$e&Qe,c[30]=Xa^~tt&nt,c[31]=et^~Ya&at,c[40]=st^~ti&dt,c[41]=ot^~ut&ga,c[2]=Oe^~Be&qa,c[3]=Ha^~Fe&Le,c[12]=za^~qe&Ge,c[13]=He^~Ka&ze,c[22]=Je^~$a&Xe,c[23]=$e^~Qe&Qa,c[32]=tt^~nt&Za,c[33]=Ya^~at&it,c[42]=ti^~dt&Ta,c[43]=ut^~ga&va,c[4]=Be^~qa&Ue,c[5]=Fe^~Le&Ga,c[14]=qe^~Ge&Wa,c[15]=Ka^~ze&Ke,c[24]=$a^~Xe&Ye,c[25]=Qe^~Qa&Ze,c[34]=nt^~Za&rt,c[35]=at^~it&ei,c[44]=dt^~Ta&wa,c[45]=ga^~va&_a,c[6]=qa^~Ue&ja,c[7]=Le^~Ga&De,c[16]=Ge^~Wa&Ve,c[17]=ze^~Ke&je,c[26]=Xe^~Ye&We,c[27]=Qa^~Ze&Ja,c[36]=Za^~rt&Xa,c[37]=it^~ei&et,c[46]=Ta^~wa&st,c[47]=va^~_a&ot,c[8]=Ue^~ja&Oe,c[9]=Ga^~De&Ha,c[18]=Wa^~Ve&za,c[19]=Ke^~je&He,c[28]=Ye^~We&Je,c[29]=Ze^~Ja&$e,c[38]=rt^~Xa&tt,c[39]=ei^~et&Ya,c[48]=wa^~st&ti,c[49]=_a^~ot&ut,c[0]^=C[O],c[1]^=C[O+1]};if(s)qs.exports=u;else{for(x=0;x{Gy.exports=qy;function qy(n,e){if(!n)throw new Error(e||"Assertion failed")}qy.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var zy=X((qv,wd)=>{typeof Object.create=="function"?wd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wd.exports=function(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var kn=X(Se=>{"use strict";var T2=Zi(),v2=zy();Se.inherits=v2;function w2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function _2(n,e){if(Array.isArray(n))return n.slice();if(!n)return[];var t=[];if(typeof n=="string")if(e){if(e==="hex")for(n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n),i=0;i>6|192,t[a++]=r&63|128):w2(n,i)?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),t[a++]=r>>18|240,t[a++]=r>>12&63|128,t[a++]=r>>6&63|128,t[a++]=r&63|128):(t[a++]=r>>12|224,t[a++]=r>>6&63|128,t[a++]=r&63|128)}else for(i=0;i>>24|n>>>8&65280|n<<8&16711680|(n&255)<<24;return e>>>0}Se.htonl=Ky;function A2(n,e){for(var t="",a=0;a>>0}return r}Se.join32=E2;function M2(n,e){for(var t=new Array(n.length*4),a=0,i=0;a>>24,t[i+1]=r>>>16&255,t[i+2]=r>>>8&255,t[i+3]=r&255):(t[i+3]=r>>>24,t[i+2]=r>>>16&255,t[i+1]=r>>>8&255,t[i]=r&255)}return t}Se.split32=M2;function C2(n,e){return n>>>e|n<<32-e}Se.rotr32=C2;function I2(n,e){return n<>>32-e}Se.rotl32=I2;function S2(n,e){return n+e>>>0}Se.sum32=S2;function R2(n,e,t){return n+e+t>>>0}Se.sum32_3=R2;function P2(n,e,t,a){return n+e+t+a>>>0}Se.sum32_4=P2;function N2(n,e,t,a,i){return n+e+t+a+i>>>0}Se.sum32_5=N2;function D2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Se.sum64=D2;function O2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Se.sum64_hi=O2;function B2(n,e,t,a){var i=e+a;return i>>>0}Se.sum64_lo=B2;function F2(n,e,t,a,i,r,s,o){var l=0,p=e;p=p+a>>>0,l+=p>>0,l+=p>>0,l+=p>>0}Se.sum64_4_hi=F2;function L2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Se.sum64_4_lo=L2;function U2(n,e,t,a,i,r,s,o,l,p){var f=0,b=e;b=b+a>>>0,f+=b>>0,f+=b>>0,f+=b>>0,f+=b>>0}Se.sum64_5_hi=U2;function V2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Se.sum64_5_lo=V2;function j2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Se.rotr64_hi=j2;function H2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.rotr64_lo=H2;function q2(n,e,t){return n>>>t}Se.shr64_hi=q2;function G2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.shr64_lo=G2});var er=X(Qy=>{"use strict";var $y=kn(),z2=Zi();function po(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Qy.BlockHash=po;po.prototype.update=function(e,t){if(e=$y.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=$y.join32(e,0,e.length-a,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=e&255}else for(i[r++]=e&255,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,s=8;s{"use strict";var K2=kn(),jn=K2.rotr32;function W2(n,e,t,a){if(n===0)return Xy(e,t,a);if(n===1||n===3)return Zy(e,t,a);if(n===2)return Yy(e,t,a)}oa.ft_1=W2;function Xy(n,e,t){return n&e^~n&t}oa.ch32=Xy;function Yy(n,e,t){return n&e^n&t^e&t}oa.maj32=Yy;function Zy(n,e,t){return n^e^t}oa.p32=Zy;function J2(n){return jn(n,2)^jn(n,13)^jn(n,22)}oa.s0_256=J2;function $2(n){return jn(n,6)^jn(n,11)^jn(n,25)}oa.s1_256=$2;function Q2(n){return jn(n,7)^jn(n,18)^n>>>3}oa.g0_256=Q2;function X2(n){return jn(n,17)^jn(n,19)^n>>>10}oa.g1_256=X2});var n0=X((Wv,t0)=>{"use strict";var tr=kn(),Y2=er(),Z2=_d(),kd=tr.rotl32,zr=tr.sum32,eh=tr.sum32_5,th=Z2.ft_1,e0=Y2.BlockHash,nh=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;e0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}tr.inherits(Hn,e0);t0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.prototype._update=function(e,t){for(var a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var nr=kn(),ah=er(),ar=_d(),ih=Zi(),An=nr.sum32,rh=nr.sum32_4,sh=nr.sum32_5,oh=ar.ch32,uh=ar.maj32,dh=ar.s0_256,lh=ar.s1_256,ph=ar.g0_256,yh=ar.g1_256,a0=ah.BlockHash,fh=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function qn(){if(!(this instanceof qn))return new qn;a0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=fh,this.W=new Array(64)}nr.inherits(qn,a0);i0.exports=qn;qn.blockSize=512;qn.outSize=256;qn.hmacStrength=192;qn.padLength=64;qn.prototype._update=function(e,t){for(var a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var Ed=kn(),r0=Ad();function ua(){if(!(this instanceof ua))return new ua;r0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ed.inherits(ua,r0);s0.exports=ua;ua.blockSize=512;ua.outSize=224;ua.hmacStrength=192;ua.padLength=64;ua.prototype._digest=function(e){return e==="hex"?Ed.toHex32(this.h.slice(0,7),"big"):Ed.split32(this.h.slice(0,7),"big")}});var Id=X((Qv,p0)=>{"use strict";var Qt=kn(),ch=er(),mh=Zi(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,u0=Qt.shr64_hi,d0=Qt.shr64_lo,Ca=Qt.sum64,Md=Qt.sum64_hi,Cd=Qt.sum64_lo,hh=Qt.sum64_4_hi,xh=Qt.sum64_4_lo,bh=Qt.sum64_5_hi,gh=Qt.sum64_5_lo,l0=ch.BlockHash,Th=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function En(){if(!(this instanceof En))return new En;l0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Th,this.W=new Array(160)}Qt.inherits(En,l0);p0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.prototype._prepareBlock=function(e,t){for(var a=this.W,i=0;i<32;i++)a[i]=e[t+i];for(;i{"use strict";var Sd=kn(),y0=Id();function da(){if(!(this instanceof da))return new da;y0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Sd.inherits(da,y0);f0.exports=da;da.blockSize=1024;da.outSize=384;da.hmacStrength=192;da.padLength=128;da.prototype._digest=function(e){return e==="hex"?Sd.toHex32(this.h.slice(0,12),"big"):Sd.split32(this.h.slice(0,12),"big")}});var m0=X(ir=>{"use strict";ir.sha1=n0();ir.sha224=o0();ir.sha256=Ad();ir.sha384=c0();ir.sha512=Id()});var v0=X(T0=>{"use strict";var ui=kn(),Nh=er(),yo=ui.rotl32,h0=ui.sum32,Kr=ui.sum32_3,x0=ui.sum32_4,g0=Nh.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;g0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}ui.inherits(Kn,g0);T0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.prototype._update=function(e,t){for(var a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,f=r,b=s,M=o,k=0;k<80;k++){var v=h0(yo(x0(a,b0(k,i,r,s),e[Bh[k]+t],Dh(k)),Lh[k]),o);a=o,o=s,s=yo(r,10),r=i,i=v,v=h0(yo(x0(l,b0(79-k,p,f,b),e[Fh[k]+t],Oh(k)),Uh[k]),M),l=M,M=b,b=yo(f,10),f=p,p=v}v=Kr(this.h[1],r,b),this.h[1]=Kr(this.h[2],s,M),this.h[2]=Kr(this.h[3],o,l),this.h[3]=Kr(this.h[4],a,p),this.h[4]=Kr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?ui.toHex32(this.h,"little"):ui.split32(this.h,"little")};function b0(n,e,t,a){return n<=15?e^t^a:n<=31?e&t|~e&a:n<=47?(e|~t)^a:n<=63?e&a|t&~a:e^(t|~a)}function Dh(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Oh(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Bh=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Fh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Lh=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Uh=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var _0=X((e3,w0)=>{"use strict";var Vh=kn(),jh=Zi();function rr(n,e,t){if(!(this instanceof rr))return new rr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Vh.toArray(e,t))}w0.exports=rr;rr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),jh(e.length<=this.blockSize);for(var t=e.length;t{var St=k0;St.utils=kn();St.common=er();St.sha=m0();St.ripemd=v0();St.hmac=_0();St.sha1=St.sha.sha1;St.sha256=St.sha.sha256;St.sha224=St.sha.sha224;St.sha384=St.sha.sha384;St.sha512=St.sha.sha512;St.ripemd160=St.ripemd.ripemd160});var Qd=X(($d,Y0)=>{"use strict";(function(n){function e(h){return parseInt(h)===h}function t(h){if(!e(h.length))return!1;for(var w=0;w255)return!1;return!0}function a(h,w){if(h.buffer&&ArrayBuffer.isView(h)&&h.name==="Uint8Array")return w&&(h.slice?h=h.slice():h=Array.prototype.slice.call(h)),h;if(Array.isArray(h)){if(!t(h))throw new Error("Array contains invalid value: "+h);return new Uint8Array(h)}if(e(h.length)&&t(h))return new Uint8Array(h);throw new Error("unsupported array-like object")}function i(h){return new Uint8Array(h)}function r(h,w,g,d,m){(d!=null||m!=null)&&(h.slice?h=h.slice(d,m):h=Array.prototype.slice.call(h,d,m)),w.set(h,g)}var s=function(){function h(g){var d=[],m=0;for(g=encodeURI(g);m191&&L<224?(d.push(String.fromCharCode((L&31)<<6|g[m+1]&63)),m+=2):(d.push(String.fromCharCode((L&15)<<12|(g[m+1]&63)<<6|g[m+2]&63)),m+=3)}return d.join("")}return{toBytes:h,fromBytes:w}}(),o=function(){function h(d){for(var m=[],L=0;L>4]+w[c&15])}return m.join("")}return{toBytes:h,fromBytes:g}}(),l={16:10,24:12,32:14},p=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],b=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],M=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],k=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],C=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],D=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],N=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],F=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],U=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],G=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],q=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],K=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ye=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function te(h){for(var w=[],g=0;g>2,this._Ke[L][w%4]=m[w],this._Kd[h-L][w%4]=m[w];for(var c=0,I=d,S;I>16&255]<<24^f[S>>8&255]<<16^f[S&255]<<8^f[S>>24&255]^p[c]<<24,c+=1,d!=8)for(var w=1;w>8&255]<<8^f[S>>16&255]<<16^f[S>>24&255]<<24;for(var w=d/2+1;w>2,H=I%4,this._Ke[O][H]=m[w],this._Kd[h-O][H]=m[w++],I++}for(var O=1;O>24&255]^q[S>>16&255]^K[S>>8&255]^ye[S&255]},ae.prototype.encrypt=function(h){if(h.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var w=this._Ke.length-1,g=[0,0,0,0],d=te(h),m=0;m<4;m++)d[m]^=this._Ke[0][m];for(var L=1;L>24&255]^k[d[(m+1)%4]>>16&255]^v[d[(m+2)%4]>>8&255]^C[d[(m+3)%4]&255]^this._Ke[L][m];d=g.slice()}for(var c=i(16),I,m=0;m<4;m++)I=this._Ke[w][m],c[4*m]=(f[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^I>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^I)&255;return c},ae.prototype.decrypt=function(h){if(h.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var w=this._Kd.length-1,g=[0,0,0,0],d=te(h),m=0;m<4;m++)d[m]^=this._Kd[0][m];for(var L=1;L>24&255]^N[d[(m+3)%4]>>16&255]^F[d[(m+2)%4]>>8&255]^U[d[(m+1)%4]&255]^this._Kd[L][m];d=g.slice()}for(var c=i(16),I,m=0;m<4;m++)I=this._Kd[w][m],c[4*m]=(b[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(b[d[(m+3)%4]>>16&255]^I>>16)&255,c[4*m+2]=(b[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(b[d[(m+1)%4]&255]^I)&255;return c};var Re=function(h){if(!(this instanceof Re))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new ae(h)};Re.prototype.encrypt=function(h){if(h=a(h),h.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var w=i(h.length),g=i(16),d=0;d=0;--w)this._counter[w]=h%256,h=h>>8},u.prototype.setBytes=function(h){if(h=a(h,!0),h.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=h},u.prototype.increment=function(){for(var h=15;h>=0;h--)if(this._counter[h]===255)this._counter[h]=0;else{this._counter[h]++;break}};var y=function(h,w){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",w instanceof u||(w=new u(w)),this._counter=w,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new ae(h)};y.prototype.encrypt=function(h){for(var w=a(h,!0),g=0;g16)throw new Error("PKCS#7 padding byte out of range");for(var g=h.length-w,d=0;d{"use strict";(function(n){function t(k){let v=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),C=1779033703,D=3144134277,N=1013904242,F=2773480762,U=1359893119,G=2600822924,q=528734635,K=1541459225,ye=new Uint32Array(64);function te(y){let x=0,T=y.length;for(;T>=64;){let _=C,h=D,w=N,g=F,d=U,m=G,L=q,c=K,I,S,O,H,Q;for(S=0;S<16;S++)O=x+S*4,ye[S]=(y[O]&255)<<24|(y[O+1]&255)<<16|(y[O+2]&255)<<8|y[O+3]&255;for(S=16;S<64;S++)I=ye[S-2],H=(I>>>17|I<<32-17)^(I>>>19|I<<32-19)^I>>>10,I=ye[S-15],Q=(I>>>7|I<<32-7)^(I>>>18|I<<32-18)^I>>>3,ye[S]=(H+ye[S-7]|0)+(Q+ye[S-16]|0)|0;for(S=0;S<64;S++)H=(((d>>>6|d<<32-6)^(d>>>11|d<<32-11)^(d>>>25|d<<32-25))+(d&m^~d&L)|0)+(c+(v[S]+ye[S]|0)|0)|0,Q=((_>>>2|_<<32-2)^(_>>>13|_<<32-13)^(_>>>22|_<<32-22))+(_&h^_&w^h&w)|0,c=L,L=m,m=d,d=g+H|0,g=w,w=h,h=_,_=H+Q|0;C=C+_|0,D=D+h|0,N=N+w|0,F=F+g|0,U=U+d|0,G=G+m|0,q=q+L|0,K=K+c|0,x+=64,T-=64}}te(k);let ae,Re=k.length%64,ie=k.length/536870912|0,we=k.length<<3,E=Re<56?56:120,u=k.slice(k.length-Re,k.length);for(u.push(128),ae=Re+1;ae>>24&255),u.push(ie>>>16&255),u.push(ie>>>8&255),u.push(ie>>>0&255),u.push(we>>>24&255),u.push(we>>>16&255),u.push(we>>>8&255),u.push(we>>>0&255),te(u),[C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,G>>>24&255,G>>>16&255,G>>>8&255,G>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,K>>>24&255,K>>>16&255,K>>>8&255,K>>>0&255]}function a(k,v,C){k=k.length<=64?k:t(k);let D=64+v.length+4,N=new Array(D),F=new Array(64),U,G=[];for(U=0;U<64;U++)N[U]=54;for(U=0;U=D-4;K--){if(N[K]++,N[K]<=255)return;N[K]=0}}for(;C>=32;)q(),G=G.concat(t(F.concat(t(N)))),C-=32;return C>0&&(q(),G=G.concat(t(F.concat(t(N))).slice(0,C))),G}function i(k,v,C,D,N){let F;for(l(k,(2*C-1)*16,N,0,16),F=0;F<2*C;F++)o(k,F*16,N,16),s(N,D),l(N,0,k,v+F*16,16);for(F=0;F>>32-v}function s(k,v){l(k,0,v,0,16);for(let C=8;C>0;C-=2)v[4]^=r(v[0]+v[12],7),v[8]^=r(v[4]+v[0],9),v[12]^=r(v[8]+v[4],13),v[0]^=r(v[12]+v[8],18),v[9]^=r(v[5]+v[1],7),v[13]^=r(v[9]+v[5],9),v[1]^=r(v[13]+v[9],13),v[5]^=r(v[1]+v[13],18),v[14]^=r(v[10]+v[6],7),v[2]^=r(v[14]+v[10],9),v[6]^=r(v[2]+v[14],13),v[10]^=r(v[6]+v[2],18),v[3]^=r(v[15]+v[11],7),v[7]^=r(v[3]+v[15],9),v[11]^=r(v[7]+v[3],13),v[15]^=r(v[11]+v[7],18),v[1]^=r(v[0]+v[3],7),v[2]^=r(v[1]+v[0],9),v[3]^=r(v[2]+v[1],13),v[0]^=r(v[3]+v[2],18),v[6]^=r(v[5]+v[4],7),v[7]^=r(v[6]+v[5],9),v[4]^=r(v[7]+v[6],13),v[5]^=r(v[4]+v[7],18),v[11]^=r(v[10]+v[9],7),v[8]^=r(v[11]+v[10],9),v[9]^=r(v[8]+v[11],13),v[10]^=r(v[9]+v[8],18),v[12]^=r(v[15]+v[14],7),v[13]^=r(v[12]+v[15],9),v[14]^=r(v[13]+v[12],13),v[15]^=r(v[14]+v[13],18);for(let C=0;C<16;++C)k[C]+=v[C]}function o(k,v,C,D){for(let N=0;N=256)return!1}return!0}function f(k,v){if(typeof k!="number"||k%1)throw new Error("invalid "+v);return k}function b(k,v,C,D,N,F,U){if(C=f(C,"N"),D=f(D,"r"),N=f(N,"p"),F=f(F,"dkLen"),C===0||(C&C-1)!==0)throw new Error("N must be power of 2");if(C>2147483647/128/D)throw new Error("N too large");if(D>2147483647/128/N)throw new Error("r too large");if(!p(k))throw new Error("password must be an array or buffer");if(k=Array.prototype.slice.call(k),!p(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let G=a(k,v,N*128*D),q=new Uint32Array(N*32*D);for(let d=0;dh&&(d=h);for(let L=0;Lh&&(d=h);for(let L=0;L>0&255),G.push(q[L]>>8&255),G.push(q[L]>>16&255),G.push(q[L]>>24&255);let m=a(k,G,F);return U&&U(null,1,m),m}U&&w(g)};if(!U)for(;;){let d=g();if(d!=null)return d}g()}let M={scrypt:function(k,v,C,D,N,F,U){return new Promise(function(G,q){let K=0;U&&U(0),b(k,v,C,D,N,F,function(ye,te,ae){if(ye)q(ye);else if(ae)U&&K!==1&&U(1),G(new Uint8Array(ae));else if(U&&te!==K)return K=te,U(te)})})},syncScrypt:function(k,v,C,D,N,F){return new Uint8Array(b(k,v,C,D,N,F))}};typeof tl<"u"?ef.exports=M:typeof define=="function"&&define.amd?define(M):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=M)})(tl)});var Ef=X((qw,Af)=>{"use strict";var Bo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",sl={};for(ns=0;ns>25;return(n&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function _f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=cr(e)^a>>5}for(e=cr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=_f(n);if(typeof a=="string")throw new Error(a);for(var i=n+"1",r=0;r>5!==0)throw new Error("Non 5-bit word");a=cr(a)^s,i+=Bo.charAt(s)}for(r=0;r<6;++r)a=cr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Bo.charAt(o)}return i}function kf(n,e){if(e=e||90,n.length<8)return n+" too short";if(n.length>e)return"Exceeds length limit";var t=n.toLowerCase(),a=n.toUpperCase();if(n!==t&&n!==a)return"Mixed-case string "+n;n=t;var i=n.lastIndexOf("1");if(i===-1)return"No separator character for "+n;if(i===0)return"Missing prefix for "+n;var r=n.slice(0,i),s=n.slice(i+1);if(s.length<6)return"Data too short";var o=_f(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(b)}return o!==1?"Invalid checksum for "+n:{prefix:r,words:l}}function Ax(){var n=kf.apply(null,arguments);if(typeof n=="object")return n}function Ex(n){var e=kf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fo(n,e,t,a){for(var i=0,r=0,s=(1<=t;)r-=t,o.push(i>>r&s);if(a)r>0&&o.push(i<=e)return"Excess padding";if(i<{(function(n,e){typeof Ll=="object"&&typeof Ul<"u"?Ul.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Ll,function(){"use strict";var n=function(a,i){if(i=i||{},typeof a!="function")throw new t("fetch must be a function");if(typeof i!="object")throw new t("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new t("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(r,i),function(o,l){var p=i.retries,f=i.retryDelay,b=i.retryOn;if(l&&l.retries!==void 0)if(e(l.retries))p=l.retries;else throw new t("retries must be a positive integer");if(l&&l.retryDelay!==void 0)if(e(l.retryDelay)||typeof l.retryDelay=="function")f=l.retryDelay;else throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(l&&l.retryOn)if(Array.isArray(l.retryOn)||typeof l.retryOn=="function")b=l.retryOn;else throw new t("retryOn property expects an array or function");return new Promise(function(M,k){var v=function(D){var N=typeof Request<"u"&&o instanceof Request?o.clone():o;a(N,l).then(function(F){if(Array.isArray(b)&&b.indexOf(F.status)===-1)M(F);else if(typeof b=="function")try{return Promise.resolve(b(D,null,F)).then(function(U){U?C(D,null,F):M(F)}).catch(k)}catch(U){k(U)}else D=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Vl=X(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.$dictionary=void 0;Yo.$dictionary=function(){var n,e=typeof global=="object"&&typeof global.process=="object"&&typeof global.process.versions=="object"&&typeof global.process.versions.node<"u"?global:window;return(n=e.__typia_custom_validator)!==null&&n!==void 0?n:e.__typia_custom_validator=new Map}()});var As=X((Qk,Vc)=>{Vc.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Hl=X(Ba=>{var Ae=As(),jl=()=>[{type:Ae.RANGE,from:48,to:57}],jc=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(jl()),Hc=()=>[{type:Ae.CHAR,value:9},{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:11},{type:Ae.CHAR,value:12},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:32},{type:Ae.CHAR,value:160},{type:Ae.CHAR,value:5760},{type:Ae.RANGE,from:8192,to:8202},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233},{type:Ae.CHAR,value:8239},{type:Ae.CHAR,value:8287},{type:Ae.CHAR,value:12288},{type:Ae.CHAR,value:65279}],x5=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Ba.words=()=>({type:Ae.SET,set:jc(),not:!1});Ba.notWords=()=>({type:Ae.SET,set:jc(),not:!0});Ba.ints=()=>({type:Ae.SET,set:jl(),not:!1});Ba.notInts=()=>({type:Ae.SET,set:jl(),not:!0});Ba.whitespace=()=>({type:Ae.SET,set:Hc(),not:!1});Ba.notWhitespace=()=>({type:Ae.SET,set:Hc(),not:!0});Ba.anyChar=()=>({type:Ae.SET,set:x5(),not:!0})});var Gc=X(Es=>{var qc=As(),kr=Hl(),b5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",g5={0:0,t:9,n:10,v:11,f:12,r:13};Es.strToChars=function(n){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return n=n.replace(e,function(t,a,i,r,s,o,l,p){if(i)return t;var f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?b5.indexOf(l):g5[p],b=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),n};Es.tokenizeClass=(n,e)=>{for(var t=[],a=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,r;(i=a.exec(n))!=null;)if(i[1])t.push(kr.words());else if(i[2])t.push(kr.ints());else if(i[3])t.push(kr.whitespace());else if(i[4])t.push(kr.notWords());else if(i[5])t.push(kr.notInts());else if(i[6])t.push(kr.notWhitespace());else if(i[7])t.push({type:qc.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:qc.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Es.error(e,"Unterminated character class")};Es.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var zc=X(Ms=>{var Zo=As();Ms.wordBoundary=()=>({type:Zo.POSITION,value:"b"});Ms.nonWordBoundary=()=>({type:Zo.POSITION,value:"B"});Ms.begin=()=>({type:Zo.POSITION,value:"^"});Ms.end=()=>({type:Zo.POSITION,value:"$"})});var Kc=X((eA,ql)=>{var Ar=Gc(),xn=As(),vi=Hl(),eu=zc();ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=N=>{Ar.error(n,`Nothing to repeat at column ${N-1}`)},p=Ar.strToChars(n);for(t=p.length;e{"use strict";var bn=class{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new bn(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var a=i=>{for(var r=0;r{for(var r=0;r{for(var s=0;s{for(var a=t.low;a<=t.high;)e.push(a),a++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};Wc.exports=Fa});var Qc=X((nA,$c)=>{var tu=Kc(),Cs=Jc(),wi=tu.types;$c.exports=class Is{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=tu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Is.prototype.max!=null?Is.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var a,i,r,s,o;switch(e.type){case wi.ROOT:case wi.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=t.push(null)-1),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var T5=_i&&_i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_i,"__esModule",{value:!0});_i.RandomGenerator=void 0;var v5=T5(Qc()),w5;(function(n){var e="abcdefghijklmnopqrstuvwxyz";n.boolean=function(){return Math.random()<.5},n.integer=function(t,a){return t??(t=0),a??(a=100),Math.floor(Math.random()*(a-t+1))+t},n.bigint=function(t,a){return t??(t=BigInt(0)),a??(a=BigInt(100)),BigInt(n.integer(Number(t),Number(a)))},n.number=function(t,a){return t??(t=0),a??(a=100),Math.random()*(a-t)+t},n.string=function(t){return new Array(t??n.integer(5,10)).fill(0).map(function(){return e[n.integer(0,e.length-1)]}).join("")},n.array=function(t,a){return new Array(a??n.integer(0,3)).fill(0).map(function(i,r){return t(r)})},n.pick=function(t){return t[n.integer(0,t.length-1)]},n.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,i=t==="x"?a:a&3|8;return i.toString(16)})},n.email=function(){return"".concat(n.string(10),"@").concat(n.string(10),".").concat(n.string(3))},n.url=function(){return"https://".concat(n.string(10),".").concat(n.string(3))},n.ipv4=function(){return n.array(function(){return n.integer(0,255)},4).join(".")},n.ipv6=function(){return n.array(function(){return n.integer(0,65535).toString(16)},8).join(":")},n.pattern=function(t){return new v5.default(t).gen()},n.date=function(t,a){return t??(t=0),a??(a=Date.now()*2),new Date(n.number(t,a)).toISOString().substring(0,10)},n.datetime=function(t,a){return t??(t=0),a??(a=Date.now()*2),new Date(n.number(t,a)).toISOString()}})(w5=_i.RandomGenerator||(_i.RandomGenerator={}))});var Ss=X(Er=>{"use strict";var _5=Er&&Er.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(a[r]=i[r])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}();Object.defineProperty(Er,"__esModule",{value:!0});Er.TypeGuardError=void 0;var k5=function(n){_5(e,n);function e(t){var a=this.constructor,i=n.call(this,t.message||"Error on ".concat(t.method,"(): invalid type").concat(t.path?" on ".concat(t.path):"",", expect to be ").concat(t.expected))||this,r=a.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r,i.method=t.method,i.path=t.path,i.expected=t.expected,i.value=t.value,i}return e}(Error);Er.TypeGuardError=k5});var Yc=X(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.$any=void 0;var A5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};nu.$any=A5});var Zc=X(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$every=void 0;var E5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$guard=void 0;var M5=Ss(),C5=function(n){return function(e,t){if(e===!0)throw new M5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};iu.$guard=C5});var tm=X(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.$is_between=void 0;var I5=function(n,e,t){return e<=n&&n<=t};ru.$is_between=I5});var nm=X(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.$is_custom=void 0;var S5=Vl(),R5=function(n,e,t,a){var i,r=(i=S5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};su.$is_custom=R5});var am=X(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$is_date=void 0;var P5=function(n){return N5.test(n)};ou.$is_date=P5;var N5=/^(\d{4})-(\d{2})-(\d{2})$/});var im=X(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$is_datetime=void 0;var D5=function(n){return!isNaN(new Date(n).getTime())};uu.$is_datetime=D5});var rm=X(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$is_email=void 0;var O5=function(n){return B5.test(n)};du.$is_email=O5;var B5=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var sm=X(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_ipv4=void 0;var F5=function(n){return L5.test(n)};lu.$is_ipv4=F5;var L5=/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/});var om=X(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_ipv6=void 0;var U5=function(n){return V5.test(n)};pu.$is_ipv6=U5;var V5=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/});var um=X(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_url=void 0;var j5=function(n){return H5.test(n)};yu.$is_url=j5;var H5=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var dm=X(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_uuid=void 0;var q5=function(n){return G5.test(n)};fu.$is_uuid=q5;var G5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});var lm=X(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$join=void 0;var z5=function(n){return K5(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};cu.$join=z5;var K5=function(n){return W5(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},W5=function(n){return J5.has(n)},J5=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with"])});var pm=X(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$number=void 0;var $5=Ss(),Q5=function(n){if(isFinite(n)===!1)throw new $5.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};mu.$number=Q5});var ym=X(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$report=void 0;var X5=function(n){var e=function(t){if(n.length===0)return!0;var a=n[n.length-1].path;return t.length>a.length||a.substring(0,t.length)!==t};return function(t,a){return t&&e(a.path)&&n.push(a),!1}};hu.$report=X5});var fm=X(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$rest=void 0;var Y5=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};xu.$rest=Y5});var cm=X(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$string=void 0;var Z5=function(n){if(n.length>41)return JSON.stringify(n);for(var e=n.length,t="",a=0,i=!1,r=!1,s=255,o=0;o=32;o++){if(s=n.charCodeAt(o),55296<=s&&s<=57343){r=!0;break}(s===34||s===92)&&(t+=n.slice(a,o)+"\\",a=o,i=!0)}return i?t+=n.slice(a):t=n,s<32||r===!0?JSON.stringify(n):'"'.concat(t,'"')};bu.$string=Z5});var mm=X(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$tail=void 0;var eb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};gu.$tail=eb});var gm=X(ki=>{"use strict";var Ut=ki&&ki.__assign||function(){return Ut=Object.assign||function(n){for(var e,t=1,a=arguments.length;t=o.path.length&&l.substring(0,o.path.length)===o.path)return}s.push(o)}(),a}}})},n.stringify=function(t){return Ut(Ut({},n.is()),{number:fb.$number,string:hb.$string,tail:xb.$tail,rest:mb.$rest,throws:e(t)})},n.clone=function(t){return Ut(Ut({},n.is()),{throws:e(t),any:tb.$any})},n.prune=function(t){return Ut(Ut({},n.is()),{throws:e(t)})},n.random=function(){return{generator:hm.RandomGenerator,pick:hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new xm.TypeGuardError(Ut(Ut({},a),{method:"typia.".concat(t)}))}}})(bb=ki.Namespace||(ki.Namespace={}))});var Tm=X(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.MapUtil=void 0;var gb;(function(n){n.take=function(e){return function(t,a){var i=e.get(t);if(i)return i;var r=a();return e.set(t,r),r}}})(gb=Rs.MapUtil||(Rs.MapUtil={}))});var wm=X(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0})});var km=X(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0})});var Em=X(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0})});var Cm=X(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0})});var Sm=X(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0})});var Pm=X(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0})});var np=X(V=>{"use strict";var Tb=V&&V.__createBinding||(Object.create?function(n,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,a,i)}:function(n,e,t,a){a===void 0&&(a=t),n[a]=e[t]}),Ai=V&&V.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tb(e,n,t)};Object.defineProperty(V,"__esModule",{value:!0});V.createValidatePrune=V.createIsPrune=V.createAssertPrune=V.createPrune=V.createValidateClone=V.createIsClone=V.createAssertClone=V.createClone=V.createRandom=V.createValidateStringify=V.createIsStringify=V.createAssertStringify=V.createStringify=V.createValidateParse=V.createAssertParse=V.createIsParse=V.createValidateEquals=V.createEquals=V.createAssertEquals=V.createValidate=V.createIs=V.createAssertType=V.createAssert=V.validatePrune=V.isPrune=V.assertPrune=V.prune=V.validateClone=V.isClone=V.assertClone=V.clone=V.literals=V.random=V.metadata=V.validateStringify=V.isStringify=V.assertStringify=V.stringify=V.validateParse=V.isParse=V.assertParse=V.application=V.customValidators=V.validateEquals=V.equals=V.assertEquals=V.validate=V.is=V.assertType=V.assert=void 0;var Mr=Vl(),Ee=gm(),vb=Tm();Ai(wm(),V);Ai(km(),V);Ai(Em(),V);Ai(Cm(),V);Ai(Sm(),V);Ai(Pm(),V);Ai(Ss(),V);function Gl(){ne("assert")}V.assert=Gl;Object.assign(Gl,Ee.Namespace.assert("assert"));function zl(){ne("assertType")}V.assertType=zl;Object.assign(zl,Ee.Namespace.assert("assertType"));function Tu(){ne("is")}V.is=Tu;Object.assign(Tu,Ee.Namespace.assert("is"));function vu(){ne("validate")}V.validate=vu;Object.assign(vu,Ee.Namespace.validate());function Kl(){ne("assertEquals")}V.assertEquals=Kl;Object.assign(Kl,Ee.Namespace.assert("assertEquals"));function Wl(){ne("equals")}V.equals=Wl;Object.assign(Wl,Ee.Namespace.is());function Jl(){ne("validateEquals")}V.validateEquals=Jl;Object.assign(Jl,Ee.Namespace.validate());V.customValidators={size:function(n){var e,t;return n?(t=(e=Mr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Mr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.has(e))!==null&&a!==void 0?a:!1}},get:function(n){return function(e){var t;return(t=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=vb.MapUtil.take(Mr.$dictionary)(n,function(){return new Map});return a.has(e)?!1:(a.set(e,t),!0)}}},erase:function(n){return function(e){var t,a;return(a=(t=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function wb(){ne("application")}V.application=wb;function $l(){ne("assertParse")}V.assertParse=$l;Object.assign($l,Ee.Namespace.assert("assertParse"));function Ql(){ne("isParse")}V.isParse=Ql;Object.assign(Ql,Tu);function Xl(){ne("validateParse")}V.validateParse=Xl;Object.assign(Xl,vu);function Yl(){ne("stringify")}V.stringify=Yl;Object.assign(Yl,Ee.Namespace.stringify("stringify"));function wu(){ne("assertStringify")}V.assertStringify=wu;Object.assign(wu,Ee.Namespace.assert("assertStringify"));Object.assign(wu,Ee.Namespace.stringify("assertStringify"));function _u(){ne("isStringify")}V.isStringify=_u;Object.assign(_u,Ee.Namespace.is());Object.assign(_u,Ee.Namespace.stringify("isStringify"));function ku(){ne("validateStringify")}V.validateStringify=ku;Object.assign(ku,Ee.Namespace.validate());Object.assign(ku,Ee.Namespace.stringify("validateStringify"));function _b(){ne("metadata")}V.metadata=_b;function Zl(){ne("random")}V.random=Zl;Object.assign(Zl,Ee.Namespace.random());function kb(){ne("literals")}V.literals=kb;function ep(){ne("clone")}V.clone=ep;Object.assign(ep,Ee.Namespace.clone("clone"));function Au(){ne("assertClone")}V.assertClone=Au;Object.assign(Au,Ee.Namespace.assert("assertClone"));Object.assign(Au,Ee.Namespace.clone("assertClone"));function Eu(){ne("isClone")}V.isClone=Eu;Object.assign(Eu,Ee.Namespace.is());Object.assign(Eu,Ee.Namespace.clone("isClone"));function Mu(){ne("validateClone")}V.validateClone=Mu;Object.assign(Mu,Ee.Namespace.validate());Object.assign(Mu,Ee.Namespace.clone("validateClone"));function tp(){ne("prune")}V.prune=tp;Object.assign(tp,Ee.Namespace.prune("prune"));function Cu(){ne("assertPrune")}V.assertPrune=Cu;Object.assign(Cu,Ee.Namespace.assert("assertPrune"));Object.assign(Cu,Ee.Namespace.prune("assertPrune"));function Iu(){ne("isPrune")}V.isPrune=Iu;Object.assign(Iu,Ee.Namespace.is());Object.assign(Iu,Ee.Namespace.prune("isPrune"));function Su(){ne("validatePrune")}V.validatePrune=Su;Object.assign(Su,Ee.Namespace.prune("validatePrune"));Object.assign(Su,Ee.Namespace.validate());function Nm(){ne("createAssert")}V.createAssert=Nm;Object.assign(Nm,Gl);function Dm(){ne("createAssertType")}V.createAssertType=Dm;Object.assign(Dm,zl);function Om(){ne("createIs")}V.createIs=Om;Object.assign(Om,Tu);function Bm(){ne("createValidate")}V.createValidate=Bm;Object.assign(Bm,vu);function Fm(){ne("createAssertEquals")}V.createAssertEquals=Fm;Object.assign(Fm,Kl);function Lm(){ne("createEquals")}V.createEquals=Lm;Object.assign(Lm,Wl);function Um(){ne("createValidateEquals")}V.createValidateEquals=Um;Object.assign(Um,Jl);function Vm(){ne("createIsParse")}V.createIsParse=Vm;Object.assign(Vm,Ql);function jm(){ne("createAssertParse")}V.createAssertParse=jm;Object.assign(jm,$l);function Hm(){ne("createValidateParse")}V.createValidateParse=Hm;Object.assign(Hm,Xl);function qm(){ne("createStringify")}V.createStringify=qm;Object.assign(qm,Yl);function Gm(){ne("createAssertStringify")}V.createAssertStringify=Gm;Object.assign(Gm,wu);function zm(){ne("createIsStringify")}V.createIsStringify=zm;Object.assign(zm,_u);function Km(){ne("createValidateStringify")}V.createValidateStringify=Km;Object.assign(Km,ku);function Wm(){ne("createRandom")}V.createRandom=Wm;Object.assign(Wm,Zl);function Jm(){ne("createClone")}V.createClone=Jm;Object.assign(Jm,ep);function $m(){ne("createAssertClone")}V.createAssertClone=$m;Object.assign($m,Au);function Qm(){ne("createIsClone")}V.createIsClone=Qm;Object.assign(Qm,Eu);function Xm(){ne("createValidateClone")}V.createValidateClone=Xm;Object.assign(Xm,Mu);function Ym(){ne("createPrune")}V.createPrune=Ym;Object.assign(Ym,tp);function Zm(){ne("createAssertPrune")}V.createAssertPrune=Zm;Object.assign(Zm,Cu);function e6(){ne("createIsPrune")}V.createIsPrune=e6;Object.assign(e6,Iu);function t6(){ne("createValidatePrune")}V.createValidatePrune=t6;Object.assign(t6,Su);function ne(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var a6=X(gn=>{"use strict";var n6=gn&&gn.__createBinding||(Object.create?function(n,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,a,i)}:function(n,e,t,a){a===void 0&&(a=t),n[a]=e[t]}),Ab=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Eb=gn&&gn.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&n6(e,n,t);return Ab(e,n),e},Mb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&n6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Cb=Eb(np());gn.default=Cb;Mb(np(),gn)});var vl={};Li(vl,{BaseContract:()=>or,BigNumber:()=>P,Contract:()=>ue,ContractFactory:()=>yi,FixedNumber:()=>ft,Signer:()=>Gt,VoidSigner:()=>sa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>Jo,logger:()=>oc,providers:()=>Da,utils:()=>Y,version:()=>Qo,wordlists:()=>ci});var Bp=wn($u());var Ap="logger/5.7.0";var Ep=!1,Mp=!1,Ls={debug:1,default:2,info:2,warning:3,error:4,off:5},Cp=Ls.default,Qu=null;function h6(){try{let n=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{n.push(e)}}),n.length)throw new Error("missing "+n.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(n){return n.message}return null}var Ip=h6(),Xu;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(Xu||(Xu={}));var Kt;(function(n){n.UNKNOWN_ERROR="UNKNOWN_ERROR",n.NOT_IMPLEMENTED="NOT_IMPLEMENTED",n.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",n.NETWORK_ERROR="NETWORK_ERROR",n.SERVER_ERROR="SERVER_ERROR",n.TIMEOUT="TIMEOUT",n.BUFFER_OVERRUN="BUFFER_OVERRUN",n.NUMERIC_FAULT="NUMERIC_FAULT",n.MISSING_NEW="MISSING_NEW",n.INVALID_ARGUMENT="INVALID_ARGUMENT",n.MISSING_ARGUMENT="MISSING_ARGUMENT",n.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",n.CALL_EXCEPTION="CALL_EXCEPTION",n.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",n.NONCE_EXPIRED="NONCE_EXPIRED",n.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",n.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",n.TRANSACTION_REPLACED="TRANSACTION_REPLACED",n.ACTION_REJECTED="ACTION_REJECTED"})(Kt||(Kt={}));var Sp="0123456789abcdef",A=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Ls[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Cp>Ls[a])&&console.log.apply(console,t)}debug(...e){this._log(A.levels.DEBUG,e)}info(...e){this._log(A.levels.INFO,e)}warn(...e){this._log(A.levels.WARNING,e)}makeError(e,t,a){if(Mp)return this.makeError("censored error",t,{});t||(t=A.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let f="";for(let b=0;b>4],f+=Sp[p[b]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(p))}catch{i.push(l+"="+JSON.stringify(a[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Kt.NUMERIC_FAULT:{s="NUMERIC_FAULT";let l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":s+="-"+l;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case Kt.CALL_EXCEPTION:case Kt.INSUFFICIENT_FUNDS:case Kt.MISSING_NEW:case Kt.NONCE_EXPIRED:case Kt.REPLACEMENT_UNDERPRICED:case Kt.TRANSACTION_REPLACED:case Kt.UNPREDICTABLE_GAS_LIMIT:s=t;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let o=new Error(e);return o.reason=r,o.code=t,Object.keys(a).forEach(function(l){o[l]=a[l]}),o}throwError(e,t,a){throw this.makeError(e,t,a)}throwArgumentError(e,t,a){return this.throwError(e,A.errors.INVALID_ARGUMENT,{argument:t,value:a})}assert(e,t,a,i){e||this.throwError(t,a,i)}assertArgument(e,t,a,i){e||this.throwArgumentError(t,a,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),Ip&&this.throwError("platform missing String.prototype.normalize",A.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ip})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,A.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,A.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,A.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",A.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",A.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",A.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Qu||(Qu=new A(Ap)),Qu}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ep){if(!e)return;this.globalLogger().throwError("error censorship permanent",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Mp=!!e,Ep=!!t}static setLogLevel(e){let t=Ls[e.toLowerCase()];if(t==null){A.globalLogger().warn("invalid log level - "+e);return}Cp=t}static from(e){return new A(e)}};A.errors=Kt;A.levels=Xu;var Rp="bytes/5.7.0";var wt=new A(Rp);function Np(n){return!!n.toHexString}function Ui(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ui(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ta(n){return Z(n)&&!(n.length%2)||on(n)}function Pp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Pp(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function B(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid arrayify value");let t=[];for(;n;)t.unshift(n&255),n=parseInt(String(n/256));return t.length===0&&t.push(0),Ui(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Np(n)&&(n=n.toHexString()),Z(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",n));let a=[];for(let i=0;iB(i)),t=e.reduce((i,r)=>i+r.length,0),a=new Uint8Array(t);return e.reduce((i,r)=>(a.set(r,i),i+r.length),0),Ui(a)}function Zt(n){let e=B(n);if(e.length===0)return e;let t=0;for(;te&&wt.throwArgumentError("value out of range","value",arguments[0]);let t=new Uint8Array(e);return t.set(n,e-n.length),Ui(t)}function Z(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var Yu="0123456789abcdef";function j(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=Yu[n&15]+t,n=Math.floor(n/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof n=="bigint")return n=n.toString(16),n.length%2?"0x0"+n:"0x"+n;if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Np(n))return n.toHexString();if(Z(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+Yu[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Pt(n){if(typeof n!="string")n=j(n);else if(!Z(n)||n.length%2)return null;return(n.length-2)/2}function Me(n,e,t){return typeof n!="string"?n=j(n):(!Z(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=j(t).substring(2)}),e}function Fn(n){let e=Zu(j(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function Zu(n){typeof n!="string"&&(n=j(n)),Z(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Ln(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ta(n)){let t=B(n);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=j(t.slice(0,32)),e.s=j(t.slice(32,64))):t.length===65?(e.r=j(t.slice(0,32)),e.s=j(t.slice(32,64)),e.v=t[64]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=j(t.slice(32,64))}else{if(e.r=n.r,e.s=n.s,e.v=n.v,e.recoveryParam=n.recoveryParam,e._vs=n._vs,e._vs!=null){let i=ni(B(e._vs),32);e._vs=j(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=j(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.throwArgumentError("signature missing v and recoveryParam","signature",n):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!Z(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=fe(e.r,32),e.s==null||!Z(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=fe(e.s,32);let t=B(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=j(t);e._vs&&(Z(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=fe(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Pr(n){return n=Ln(n),j(de([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Us="bignumber/5.7.0";var Nr=Bp.default.BN,na=new A(Us),ed={},Dp=9007199254740991;function Fp(n){return n!=null&&(P.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||Z(n)||typeof n=="bigint"||on(n))}var Op=!1,P=class{constructor(e,t){e!==ed&&na.throwError("cannot call constructor directly; use BigNumber.from",A.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wt(he(this).fromTwos(e))}toTwos(e){return Wt(he(this).toTwos(e))}abs(){return this._hex[0]==="-"?P.from(this._hex.substring(1)):this}add(e){return Wt(he(this).add(he(e)))}sub(e){return Wt(he(this).sub(he(e)))}div(e){return P.from(e).isZero()&&un("division-by-zero","div"),Wt(he(this).div(he(e)))}mul(e){return Wt(he(this).mul(he(e)))}mod(e){let t=he(e);return t.isNeg()&&un("division-by-zero","mod"),Wt(he(this).umod(t))}pow(e){let t=he(e);return t.isNeg()&&un("negative-power","pow"),Wt(he(this).pow(t))}and(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Wt(he(this).and(t))}or(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Wt(he(this).or(t))}xor(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Wt(he(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Wt(he(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Wt(he(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Wt(he(this).shrn(e))}eq(e){return he(this).eq(he(e))}lt(e){return he(this).lt(he(e))}lte(e){return he(this).lte(he(e))}gt(e){return he(this).gt(he(e))}gte(e){return he(this).gte(he(e))}isNegative(){return this._hex[0]==="-"}isZero(){return he(this).isZero()}toNumber(){try{return he(this).toNumber()}catch{un("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return na.throwError("this platform does not support BigInt",A.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Op||(Op=!0,na.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?na.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",A.errors.UNEXPECTED_ARGUMENT,{}):na.throwError("BigNumber.toString does not accept parameters",A.errors.UNEXPECTED_ARGUMENT,{})),he(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof P)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new P(ed,Dr(e)):e.match(/^-?[0-9]+$/)?new P(ed,Dr(new Nr(e))):na.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Dp||e<=-Dp)&&un("overflow","BigNumber.from",e),P.from(String(e));let t=e;if(typeof t=="bigint")return P.from(t.toString());if(on(t))return P.from(j(t));if(t)if(t.toHexString){let a=t.toHexString();if(typeof a=="string")return P.from(a)}else{let a=t._hex;if(a==null&&t.type==="BigNumber"&&(a=t.hex),typeof a=="string"&&(Z(a)||a[0]==="-"&&Z(a.substring(1))))return P.from(a)}return na.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Dr(n){if(typeof n!="string")return Dr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&na.throwArgumentError("invalid hex","value",n),n=Dr(n),n==="0x00"?n:"-"+n;if(n.substring(0,2)!=="0x"&&(n="0x"+n),n==="0x")return"0x00";for(n.length%2&&(n="0x0"+n.substring(2));n.length>4&&n.substring(0,4)==="0x00";)n="0x"+n.substring(4);return n}function Wt(n){return P.from(Dr(n))}function he(n){let e=P.from(n).toHexString();return e[0]==="-"?new Nr("-"+e.substring(3),16):new Nr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),na.throwError(n,A.errors.NUMERIC_FAULT,a)}function td(n){return new Nr(n,36).toString(16)}function nd(n){return new Nr(n,16).toString(36)}var Vt=new A(Us),Or={},Up=P.from(0),Vp=P.from(-1);function jp(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Vt.throwError(n,A.errors.NUMERIC_FAULT,i)}var Br="0";for(;Br.length<256;)Br+=Br;function ad(n){if(typeof n!="number")try{n=P.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Br.substring(0,n):Vt.throwArgumentError("invalid decimal size","decimals",n)}function Vi(n,e){e==null&&(e=0);let t=ad(e);n=P.from(n);let a=n.lt(Up);a&&(n=n.mul(Vp));let i=n.mod(t).toString();for(;i.length2&&Vt.throwArgumentError("too many decimal points","value",n);let r=i[0],s=i[1];for(r||(r="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>t.length-1&&jp("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Vt.throwArgumentError("invalid fixed format ("+s+" not "+o+")","format."+s,e[s]),e[s]);t=r("signed","boolean",t),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new aa(Or,t,a,i)}},ft=class{constructor(e,t,a,i){e!==Or&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",A.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=a,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(this.format._multiplier).div(a),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(Lp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(Lp.toFormat(t.format))),t}round(e){e==null&&(e=0);let t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Vt.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let a=ft.from("1"+Br.substring(0,e),this.format),i=x6.toFormat(this.format);return this.mulUnsafe(a).addUnsafe(i).floor().divUnsafe(a)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vt.throwArgumentError("invalid byte width","width",e);let t=P.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return fe(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ft.fromString(this._value,e)}static fromValue(e,t,a){return a==null&&t!=null&&!Fp(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(Vi(e,t),aa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=aa.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(Up)&&jp("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=fe(r,a.width/8));let s=Vi(i,a.decimals);return new ft(Or,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=aa.from(t);if(B(e).length>a.width/8)throw new Error("overflow");let i=P.from(e);a.signed&&(i=i.fromTwos(a.width));let r=i.toTwos((a.signed?0:1)+a.width).toHexString(),s=Vi(i,a.decimals);return new ft(Or,r,s,a)}static from(e,t){if(typeof e=="string")return ft.fromString(e,t);if(on(e))return ft.fromBytes(e,t);try{return ft.fromValue(e,0,t)}catch(a){if(a.code!==A.errors.INVALID_ARGUMENT)throw a}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},Lp=ft.from(1),x6=ft.from("0.5");var Hp="properties/5.7.0";var b6=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Vs=new A(Hp);function R(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(n,e){for(let t=0;t<32;t++){if(n[e])return n[e];if(!n.prototype||typeof n.prototype!="object")break;n=Object.getPrototypeOf(n.prototype).constructor}return null}function Ce(n){return b6(this,void 0,void 0,function*(){let e=Object.keys(n).map(a=>{let i=n[a];return Promise.resolve(i).then(r=>({key:a,value:r}))});return(yield Promise.all(e)).reduce((a,i)=>(a[i.key]=i.value,a),{})})}function ji(n,e){(!n||typeof n!="object")&&Vs.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Vs.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}function Te(n){let e={};for(let t in n)e[t]=n[t];return e}var g6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function qp(n){if(n==null||g6[typeof n])return!0;if(Array.isArray(n)||typeof n=="object"){if(!Object.isFrozen(n))return!1;let e=Object.keys(n);for(let t=0;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&R(e,t,ct(a))}return e}return Vs.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return T6(n)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Un="abi/5.7.0";var be=new A(Un),ai={},Gp={calldata:!0,memory:!0,storage:!0},v6={calldata:!0,memory:!0};function js(n,e){if(n==="bytes"||n==="string"){if(Gp[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&v6[e])return!0;return(Gp[e]||e==="payable")&&be.throwArgumentError("invalid modifier","name",e),!1}function w6(n,e){let t=n;function a(o){be.throwArgumentError(`unexpected character at position ${o}`,"param",n)}n=n.replace(/\s/g," ");function i(o){let l={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(l.indexed=!1),l}let r={type:"",name:"",state:{allowType:!0}},s=r;for(let o=0;oJSON.parse(i.format(e)))),JSON.stringify(a)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==xe.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.format(e)).join(e===xe.full?", ":",")+")"):t+=this.type,e!==xe.sighash&&(this.indexed===!0&&(t+=" indexed"),e===xe.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?lt.fromString(e,t):lt.fromObject(e)}static fromObject(e){return lt.isParamType(e)?e:new lt(ai,{name:e.name||null,type:Hi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(lt.fromObject):null})}static fromString(e,t){function a(i){return lt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(w6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Fr(n,e){return A6(n).map(t=>lt.fromString(t,e))}var Ht=class{constructor(e,t){e!==ai&&be.throwError("use a static from method",A.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Hs(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ht.isFragment(e)?e:typeof e=="string"?Ht.fromString(e):Ht.fromObject(e)}static fromObject(e){if(Ht.isFragment(e))return e;switch(e.type){case"function":return Dt.fromObject(e);case"event":return jt.fromObject(e);case"constructor":return Nt.fromObject(e);case"error":return tn.fromObject(e);case"fallback":case"receive":return null}return be.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?jt.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Dt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Nt.fromString(e.trim()):e.split(" ")[0]==="error"?tn.fromString(e.substring(5).trim()):be.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}},jt=class extends Ht{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isEventFragment(e))return e;e.type!=="event"&&be.throwArgumentError("invalid event object","value",e);let t={name:Lr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new jt(ai,t)}static fromString(e){let t=e.match(Ur);t||be.throwArgumentError("invalid event string","value",e);let a=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":a=!0;break;case"":break;default:be.warn("unknown modifier: "+i)}}),jt.fromObject({name:t[1].trim(),anonymous:a,inputs:Fr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Kp(n,e){e.gas=null;let t=n.split("@");return t.length!==1?(t.length>2&&be.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||be.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=P.from(t[1]),t[0]):n}function Wp(n,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",n.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Jp(n){let e={constant:!1,payable:!0,stateMutability:"payable"};return n.stateMutability!=null?(e.stateMutability=n.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",n.constant!=null&&!!n.constant!==e.constant&&be.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable=e.stateMutability==="payable",n.payable!=null&&!!n.payable!==e.payable&&be.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",n)):n.payable!=null?(e.payable=!!n.payable,n.constant==null&&!e.payable&&n.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",n),e.constant=!!n.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&be.throwArgumentError("cannot have constant payable function","value",n)):n.constant!=null?(e.constant=!!n.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):n.type!=="constructor"&&be.throwArgumentError("unable to determine stateMutability","value",n),e}var Nt=class extends Ht{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});e===xe.sighash&&be.throwError("cannot format a constructor for sighash",A.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?Nt.fromString(e):Nt.fromObject(e)}static fromObject(e){if(Nt.isConstructorFragment(e))return e;e.type!=="constructor"&&be.throwArgumentError("invalid constructor object","value",e);let t=Jp(e);t.constant&&be.throwArgumentError("constructor cannot be constant","value",e);let a={name:null,type:e.type,inputs:e.inputs?e.inputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Nt(ai,a)}static fromString(e){let t={type:"constructor"};e=Kp(e,t);let a=e.match(Ur);return(!a||a[1].trim()!=="constructor")&&be.throwArgumentError("invalid constructor string","value",e),t.inputs=Fr(a[2].trim(),!1),Wp(a[3].trim(),t),Nt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Dt=class extends Nt{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(a=>a.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?Dt.fromString(e):Dt.fromObject(e)}static fromObject(e){if(Dt.isFunctionFragment(e))return e;e.type!=="function"&&be.throwArgumentError("invalid function object","value",e);let t=Jp(e),a={type:e.type,name:Lr(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(lt.fromObject):[],outputs:e.outputs?e.outputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?P.from(e.gas):null};return new Dt(ai,a)}static fromString(e){let t={type:"function"};e=Kp(e,t);let a=e.split(" returns ");a.length>2&&be.throwArgumentError("invalid function string","value",e);let i=a[0].match(Ur);if(i||be.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(i[2],!1),Wp(i[3].trim(),t),a.length>1){let r=a[1].match(Ur);(r[1].trim()!=""||r[3].trim()!="")&&be.throwArgumentError("unexpected tokens","value",e),t.outputs=Fr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function zp(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&be.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}var tn=class extends Ht{format(e){if(e||(e=xe.sighash),xe[e]||be.throwArgumentError("invalid format type","format",e),e===xe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?tn.fromString(e):tn.fromObject(e)}static fromObject(e){if(tn.isErrorFragment(e))return e;e.type!=="error"&&be.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:Lr(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return zp(new tn(ai,t))}static fromString(e){let t={type:"error"},a=e.match(Ur);return a||be.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(a[2],!1),zp(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Hi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var k6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Lr(n){return(!n||!n.match(k6))&&be.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Ur=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function A6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&id.throwError("value out-of-bounds",A.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=de([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}},ri=class{constructor(e,t,a,i){R(this,"_data",B(e)),R(this,"wordSize",t||32),R(this,"_coerceFunc",a),R(this,"allowLoose",i),this._offset=0}get data(){return j(this._data)}get consumed(){return this._offset}static coerce(e,t){let a=e.match("^u?int([0-9]+)$");return a&&parseInt(a[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):ri.coerce(e,t)}_peekBytes(e,t,a){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&a&&this._offset+t<=this._data.length?i=t:id.throwError("data out-of-bounds",A.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new ri(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return P.from(this.readBytes(this.wordSize))}};var Qp=wn($p());function le(n){return"0x"+Qp.default.keccak_256(B(n))}var Gs={};Li(Gs,{decode:()=>Vr,encode:()=>ia});var Xp="rlp/5.7.0";var Vn=new A(Xp);function Yp(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Zp(n,e,t){let a=0;for(let i=0;ie+1+a&&Vn.throwError("child data too short",A.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function ny(n,e){if(n.length===0&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Vn.throwError("data short segment too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);return e+1+t+a>n.length&&Vn.throwError("data long segment too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);e+1+t+a>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let i=j(n.slice(e+1+t,e+1+t+a));return{consumed:1+t+a,result:i}}else if(n[e]>=128){let t=n[e]-128;e+1+t>n.length&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{});let a=j(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:j(n[e])}}function Vr(n){let e=B(n),t=ny(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",n),t.result}var ay="address/5.7.0";var ka=new A(ay);function iy(n){Z(n,20)||ka.throwArgumentError("invalid address","address",n),n=n.toLowerCase();let e=n.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let a=B(le(t));for(let i=0;i<40;i+=2)a[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(a[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var E6=9007199254740991;function M6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var rd={};for(let n=0;n<10;n++)rd[String(n)]=String(n);for(let n=0;n<26;n++)rd[String.fromCharCode(65+n)]=String(10+n);var ry=Math.floor(M6(E6));function sy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>rd[a]).join("");for(;e.length>=ry;){let a=e.substring(0,ry);e=parseInt(a,10)%97+e.substring(a.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function pe(n){let e=null;if(typeof n!="string"&&ka.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=iy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&ka.throwArgumentError("bad address checksum","address",n);else if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(n.substring(2,4)!==sy(n)&&ka.throwArgumentError("bad icap checksum","address",n),e=td(n.substring(4));e.length<40;)e="0"+e;e=iy("0x"+e)}else ka.throwArgumentError("invalid address","address",n);return e}function oy(n){try{return pe(n),!0}catch{}return!1}function uy(n){let e=nd(pe(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+sy("XE00"+e)+e}function si(n){let e=null;try{e=pe(n.from)}catch{ka.throwArgumentError("missing from address","transaction",n)}let t=Zt(B(P.from(n.nonce).toHexString()));return pe(Me(le(ia([e,t])),12))}function dy(n,e,t){return Pt(e)!==32&&ka.throwArgumentError("salt must be 32 bytes","salt",e),Pt(t)!==32&&ka.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),pe(Me(le(de(["0xff",pe(n),e,t])),12))}var zs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=pe(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return pe(fe(e.readValue().toHexString(),20))}};var Ks=class extends kt{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};var Gi=new A(Un);function sd(n,e,t){let a=null;if(Array.isArray(t))a=t;else if(t&&typeof t=="object"){let l={};a=e.map(p=>{let f=p.localName;return f||Gi.throwError("cannot encode object for signature with missing names",A.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Gi.throwError("cannot encode object for signature with duplicate names",A.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]=!0,t[f]})}else Gi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Gi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ii(n.wordSize),r=new ii(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let b=r.length;l.encode(r,f);let M=i.writeUpdatableValue();s.push(k=>{M(k+b)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function od(n,e){let t=[],a=n.subReader(0);e.forEach(r=>{let s=null;if(r.dynamic){let o=n.readValue(),l=a.subReader(o.toNumber());try{s=r.decode(l)}catch(p){if(p.code===A.errors.BUFFER_OVERRUN)throw p;s=p,s.baseType=r.name,s.name=r.localName,s.type=r.type}}else try{s=r.decode(n)}catch(o){if(o.code===A.errors.BUFFER_OVERRUN)throw o;s=o,s.baseType=r.name,s.name=r.localName,s.type=r.type}s!=null&&t.push(s)});let i=e.reduce((r,s)=>{let o=s.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});e.forEach((r,s)=>{let o=r.localName;if(!o||i[o]!==1||(o==="length"&&(o="_length"),t[o]!=null))return;let l=t[s];l instanceof Error?Object.defineProperty(t,o,{enumerable:!0,get:()=>{throw l}}):t[o]=l});for(let r=0;r{throw s}})}return Object.freeze(t)}var Ws=class extends kt{constructor(e,t,a){let i=e.type+"["+(t>=0?t:"")+"]",r=t===-1||e.dynamic;super("array",i,a,r),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let a=0;ae._data.length&&Gi.throwError("insufficient data length",A.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iYs,EtherSymbol:()=>cy,HashZero:()=>Ki,MaxInt256:()=>fy,MaxUint256:()=>to,MinInt256:()=>yy,NegativeOne:()=>Zs,One:()=>eo,Two:()=>ly,WeiPerEther:()=>py,Zero:()=>zi});var Ys="0x0000000000000000000000000000000000000000";var Zs=P.from(-1),zi=P.from(0),eo=P.from(1),ly=P.from(2),py=P.from("1000000000000000000"),to=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),yy=P.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),fy=P.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ki="0x0000000000000000000000000000000000000000000000000000000000000000";var cy="\u039E";var no=class extends kt{constructor(e,t,a){let i=(t?"int":"uint")+e*8;super(i,i,a,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let a=P.from(t),i=to.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(eo).mul(Zs)))&&this._throwError("value out-of-bounds",t)}else(a.lt(zi)||a.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",t);return a=a.toTwos(this.size*8).mask(this.size*8),this.signed&&(a=a.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(a)}decode(e){let t=e.readValue().mask(this.size*8);return this.signed&&(t=t.fromTwos(this.size*8)),e.coerce(this.name,t)}};var my="strings/5.7.0";var hy=new A(my),qt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(qt||(qt={}));var Ot;(function(n){n.UNEXPECTED_CONTINUE="unexpected continuation byte",n.BAD_PREFIX="bad codepoint prefix",n.OVERRUN="string overrun",n.MISSING_CONTINUE="missing continuation byte",n.OUT_OF_RANGE="out of UTF-8 range",n.UTF16_SURROGATE="UTF-16 surrogate",n.OVERLONG="overlong representation"})(Ot||(Ot={}));function C6(n,e,t,a,i){return hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function xy(n,e,t,a,i){if(n===Ot.BAD_PREFIX||n===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Ot.OVERRUN?t.length-e-1:0}function I6(n,e,t,a,i){return n===Ot.OVERLONG?(a.push(i),0):(a.push(65533),xy(n,e,t,a,i))}var ao=Object.freeze({error:C6,ignore:xy,replace:I6});function dd(n,e){e==null&&(e=ao.error),n=B(n);let t=[],a=0;for(;a>7===0){t.push(i);continue}let r=null,s=null;if((i&224)===192)r=1,s=127;else if((i&240)===224)r=2,s=2047;else if((i&248)===240)r=3,s=65535;else{(i&192)===128?a+=e(Ot.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Ot.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Ot.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Ot.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Ot.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Ot.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ge(n,e=qt.current){e!=qt.current&&(hy.checkNormalize(),n=n.normalize(e));let t=[];for(let a=0;a>6|192),t.push(i&63|128);else if((i&64512)==55296){a++;let r=n.charCodeAt(a);if(a>=n.length||(r&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(r&1023);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return B(t)}function ud(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function ld(n,e){return'"'+dd(n,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?ud(t):(t-=65536,ud((t>>10&1023)+55296)+ud((t&1023)+56320))}).join("")+'"'}function io(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return io(dd(n,e))}function Aa(n,e=qt.current){return dd(ge(n,e))}function pd(n){let e=ge(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return j(de([e,Ki]).slice(0,32))}function yd(n){let e=B(n);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Jt(e.slice(0,t))}function S6(n){if(n.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let r=i.split(":");t+=parseInt(r[0],16),a[t]=e(r[1])}),a}function by(n){let e=0;return n.split(",").map(t=>{let a=t.split("-");a.length===1?a[1]="0":a[1]===""&&(a[1]="1");let i=e+parseInt(a[0],16);return e=parseInt(a[1],16),{l:i,h:e}})}function cd(n,e){let t=0;for(let a=0;a=t&&n<=t+i.h&&(n-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(n-t)!==-1)continue;return i}}return null}var R6=by("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),P6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),N6=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],D6=fd("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),O6=fd("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),B6=fd("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",S6),F6=by("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function L6(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function U6(n){return!!cd(n,R6)}function V6(n){let e=cd(n,N6);if(e)return[n+e.s];let t=D6[n];if(t)return t;let a=O6[n];if(a)return[n+a[0]];let i=B6[n];return i||null}function j6(n){return!!cd(n,F6)}function md(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Aa(n);e=L6(e.map(a=>{if(P6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=V6(a);return i||[a]})),e=Aa(io(e),qt.NFKC),e.forEach(a=>{if(j6(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(U6(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=io(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var ro=class extends jr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ge(t))}decode(e){return Jt(super.decode(e))}};var oi=class extends kt{constructor(e,t){let a=!1,i=[];e.forEach(s=>{s.dynamic&&(a=!0),i.push(s.type)});let r="tuple("+i.join(",")+")";super("tuple",r,t,a),this.coders=e}defaultValue(){let e=[];this.coders.forEach(a=>{e.push(a.defaultValue())});let t=this.coders.reduce((a,i)=>{let r=i.localName;return r&&(a[r]||(a[r]=0),a[r]++),a},{});return this.coders.forEach((a,i)=>{let r=a.localName;!r||t[r]!==1||(r==="length"&&(r="_length"),e[r]==null&&(e[r]=e[i]))}),Object.freeze(e)}encode(e,t){return sd(e,this.coders,t)}decode(e){return e.coerce(this.name,od(e,this.coders))}};var so=new A(Un),H6=new RegExp(/^bytes([0-9]*)$/),q6=new RegExp(/^(u?int)([0-9]*)$/),Wi=class{constructor(e){R(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new zs(e.name);case"bool":return new Js(e.name);case"string":return new ro(e.name);case"bytes":return new $s(e.name);case"array":return new Ws(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new oi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new Xs(e.name)}let t=e.type.match(q6);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&so.throwArgumentError("invalid "+t[1]+" bit length","param",e),new no(a/8,t[1]==="int",e.name)}if(t=e.type.match(H6),t){let a=parseInt(t[1]);return(a===0||a>32)&&so.throwArgumentError("invalid bytes length","param",e),new Qs(a,e.name)}return so.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ri(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ii(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(lt.from(i)));return new oi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&so.throwError("types/values length mismatch",A.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(lt.from(s))),i=new oi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(lt.from(s)));return new oi(i,"_").decode(this._getReader(B(t),a))}},Hr=new Wi;function nn(n){return le(ge(n))}var oo="hash/5.7.0";var hd={};Li(hd,{decode:()=>Ji,encode:()=>$i});function Ji(n){n=atob(n);let e=[];for(let t=0;t0&&Array.isArray(o)?i(o,s-1):t.push(o)})};return i(n,e),t}function G6(n){let e={};for(let t=0;t>--l&1}let b=31,M=Math.pow(2,b),k=M>>>1,v=k>>1,C=M-1,D=0;for(let q=0;q1;){let Re=K+ye>>>1;q>>1|f(),te=te<<1^k,ae=(ae^k)<<1|k|1;F=te,U=1+ae-te}let G=a-4;return N.map(q=>{switch(q-G){case 3:return G+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return G+256+(n[o++]<<8|n[o++]);case 1:return G+n[o++];default:return q-1}})}function K6(n){let e=0;return()=>n[e++]}function vy(n){return K6(z6(n))}function W6(n){return n&1?~n>>1:n>>1}function J6(n,e){let t=Array(n);for(let a=0;ae[s]):t}function wy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(X6(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Y6(t,n))}return G6(Ty(e))}function Q6(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function _y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function X6(n,e){let t=1+e(),a=e(),i=Q6(e),r=_y(i.length,1+n,e);return Ty(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,b)=>{let M=b*a;return[l+b*t,p.map(k=>k+M)]})}))}function Y6(n,e){let t=1+e();return _y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function ky(n){let e=qr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=qr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.set.size-p.set.size);let i=n(),r=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let o=i==1,l=i==2;return{branches:a,valid:r,fe0f:s,save:o,check:l}}}function Ay(){return vy(Ji("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}var uo=Ay(),Z6=new Set(qr(uo)),e2=new Set(qr(uo)),t2=wy(uo),n2=ky(uo),Ey=45,My=95;function Cy(n){return Aa(n)}function a2(n){return n.filter(e=>e!=65039)}function Iy(n){for(let e of n.split(".")){let t=Cy(e);try{for(let a=t.lastIndexOf(My)-1;a>=0;a--)if(t[a]!==My)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Ey&&t[3]===Ey)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Sy(n){return Iy(i2(n,a2))}function i2(n,e){let t=Cy(n).reverse(),a=[];for(;t.length;){let i=s2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Z6.has(r)){a.push(r);continue}if(e2.has(r))continue;let s=t2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Iy(r2(String.fromCodePoint(...a)))}function r2(n){return n.normalize("NFC")}function s2(n,e){var t;let a=n2,i,r,s=[],o=n.length;for(e&&(e.length=0);o;){let l=n[--o];if(a=(t=a.branches.find(p=>p.set.has(l)))===null||t===void 0?void 0:t.node,!a)break;if(a.save)r=l;else if(a.check&&l===r)break;s.push(l),a.fe0f&&(s.push(65039),o>0&&n[o-1]==65039&&o--),a.valid&&(i=s.slice(),a.valid==2&&i.splice(1,1),e&&e.push(...n.slice(o).reverse()),n.length=o)}return i}var o2=new A(oo),Py=new Uint8Array(32);Py.fill(0);function Ry(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function xd(n){let e=ge(Sy(n)),t=[];if(n.length===0)return t;let a=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(Ry(e.slice(a))),t}function bd(n){try{return xd(n).length!==0}catch{}return!1}function Ea(n){typeof n!="string"&&o2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Py,t=xd(n);for(;t.length;)e=le(de([e,le(t.pop())]));return j(e)}function Gr(n){return j(de(xd(n).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}var Ny=`Ethereum Signed Message: `;function Qi(n){return typeof n=="string"&&(n=ge(n)),le(de([ge(Ny),ge(String(n.length)),n]))}var u2=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new A(oo),Fy=new Uint8Array(32);Fy.fill(0);var d2=P.from(-1),Ly=P.from(0),Uy=P.from(1),l2=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function p2(n){let e=B(n),t=e.length%32;return t?_t([e,Fy.slice(t)]):j(e)}var y2=fe(Uy.toHexString(),32),f2=fe(Ly.toHexString(),32),Dy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},gd=["name","version","chainId","verifyingContract","salt"];function Oy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var c2={name:Oy("name"),version:Oy("version"),chainId:function(n){try{return P.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return pe(n).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{let e=B(n);if(e.length!==32)throw new Error("bad length");return j(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Td(n){{let e=n.match(/^(u?)int(\d*)$/);if(e){let t=e[1]==="",a=parseInt(e[2]||"256");(a%8!==0||a>256||e[2]&&e[2]!==String(a))&&xt.throwArgumentError("invalid numeric width","type",n);let i=l2.mask(t?a-1:a),r=t?i.add(Uy).mul(d2):Ly;return function(s){let o=P.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),fe(o.toTwos(256).toHexString(),32)}}}{let e=n.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return B(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),p2(a)}}}switch(n){case"address":return function(e){return fe(pe(e),32)};case"bool":return function(e){return e?y2:f2};case"bytes":return function(e){return le(e)};case"string":return function(e){return nn(e)}}return null}function By(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){R(this,"types",Object.freeze(ct(e))),R(this,"_encoderCache",{}),R(this,"_types",{});let t={},a={},i={};Object.keys(e).forEach(o=>{t[o]={},a[o]=[],i[o]={}});for(let o in e){let l={};e[o].forEach(p=>{l[p.name]&&xt.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(o)}`,"types",e),l[p.name]=!0;let f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Td(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[o].length===0);r.length===0?xt.throwArgumentError("missing primary type","types",e):r.length>1&&xt.throwArgumentError(`ambiguous primary types or unused types: ${r.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),R(this,"primaryType",r[0]);function s(o,l){l[o]&&xt.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),l[o]=!0,Object.keys(t[o]).forEach(p=>{!a[p]||(s(p,l),Object.keys(l).forEach(f=>{i[f][p]=!0}))}),delete l[o]}s(this.primaryType,{});for(let o in i){let l=Object.keys(i[o]);l.sort(),this._types[o]=By(o,e[o])+l.map(p=>By(p,e[p])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let i=Td(e);if(i)return i}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let i=t[1],r=this.getEncoder(i),s=parseInt(t[3]);return o=>{s>=0&&o.length!==s&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(le)),le(_t(l))}}let a=this.types[e];if(a){let i=nn(this._types[e]);return r=>{let s=a.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?le(p):p});return s.unshift(i),_t(s)}}return xt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||xt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return le(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,a){if(Td(e))return a(e,t);let i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){let s=i[1],o=parseInt(i[3]);return o>=0&&t.length!==o&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,a))}let r=this.types[e];return r?r.reduce((s,{name:o,type:l})=>(s[o]=this._visit(l,t[o],a),s),{}):xt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Dy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>gd.indexOf(a.name)-gd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return le(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return u2(this,void 0,void 0,function*(){e=Te(e);let r={};e.verifyingContract&&!Z(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(a,(o,l)=>(o==="address"&&!Z(l,20)&&(r[l]="0x"),l));for(let o in r)r[o]=yield i(o);return e.verifyingContract&&r[e.verifyingContract]&&(e.verifyingContract=r[e.verifyingContract]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){bt.hashDomain(e);let i={},r=[];gd.forEach(l=>{let p=e[l];p!=null&&(i[l]=c2[l](p),r.push({name:l,type:Dy[l]}))});let s=bt.from(t),o=Te(t);return o.EIP712Domain?xt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):o.EIP712Domain=r,s.encode(a),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(a,(l,p)=>{if(l.match(/^bytes(\d*)/))return j(B(p));if(l.match(/^u?int/))return P.from(p).toString();switch(l){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new A(Un);var Xi=class extends en{},Yi=class extends en{},vd=class extends en{},ra=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},m2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Vy(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}var Ma=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,R(this,"fragments",t.map(a=>Ht.from(a)).filter(a=>a!=null)),R(this,"_abiCoder",mt(new.target,"getAbiCoder")()),R(this,"functions",{}),R(this,"errors",{}),R(this,"events",{}),R(this,"structs",{}),this.fragments.forEach(a=>{let i=null;switch(a.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}R(this,"deploy",a);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let r=a.format();if(i[r]){gt.warn("duplicate definition - "+r);return}i[r]=a}),this.deploy||R(this,"deploy",Nt.from({payable:!1,type:"constructor"})),R(this,"_isInterface",!0)}format(e){e||(e=xe.full),e===xe.sighash&>.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(a=>a.format(e));return e===xe.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Hr}static getAddress(e){return pe(e)}static getSighash(e){return Me(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(Z(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.functions).filter(r=>r.split("(")[0]===a);return i.length===0?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),this.functions[i[0]]}let t=this.functions[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(Z(e)){let a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.throwArgumentError("no matching event","topichash",a)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.events).filter(r=>r.split("(")[0]===a);return i.length===0?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[jt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(Z(e)){let a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){let a=e.trim(),i=Object.keys(this.errors).filter(r=>r.split("(")[0]===a);return i.length===0?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),this.errors[i[0]]}let t=this.errors[Dt.fromString(e).format()];return t||gt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return mt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),mt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));let a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),j(de([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));let a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),j(de([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let a=B(t),i=null,r="",s=null,o=null,l=null;switch(a.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,a)}catch{}break;case 4:{let p=j(a.slice(0,4)),f=m2[p];if(f)s=this._abiCoder.decode(f.inputs,a.slice(4)),o=f.name,l=f.signature,f.reason&&(i=s[0]),o==="Error"?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:o==="Panic"&&(r=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let b=this.getError(p);s=this._abiCoder.decode(b.inputs,a.slice(4)),o=b.name,l=b.format()}catch{}break}}return gt.throwError("call revert exception"+r,A.errors.CALL_EXCEPTION,{method:e.format(),data:j(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),j(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&>.throwError("too many arguments for "+e.format(),A.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let a=[];e.anonymous||a.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?le(j(s)):(r.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),r.type.match(/^u?int/)&&(s=P.from(s).toHexString()),r.type==="address"&&this._abiCoder.encode(["address"],[s]),fe(j(s),32));for(t.forEach((r,s)=>{let o=e.inputs[s];if(!o.indexed){r!=null&>.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,r);return}r==null?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,r):Array.isArray(r)?a.push(r.map(l=>i(o,l))):a.push(i(o,r))});a.length&&a[a.length-1]===null;)a.pop();return a}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));let a=[],i=[],r=[];return e.anonymous||a.push(this.getEventTopic(e)),t.length!==e.inputs.length&>.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,o)=>{let l=t[o];if(s.indexed)if(s.type==="string")a.push(nn(l));else if(s.type==="bytes")a.push(le(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");a.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),r.push(l)}),{data:this._abiCoder.encode(i,r),topics:a}}decodeEventLog(e,t,a){if(typeof e=="string"&&(e=this.getEvent(e)),a!=null&&!e.anonymous){let M=this.getEventTopic(e);(!Z(a[0],32)||a[0].toLowerCase()!==M)&>.throwError("fragment/topic mismatch",A.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:M,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((M,k)=>{M.indexed?M.type==="string"||M.type==="bytes"||M.baseType==="tuple"||M.baseType==="array"?(i.push(lt.fromObject({type:"bytes32",name:M.name})),s.push(!0)):(i.push(M),s.push(!1)):(r.push(M),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,de(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,b=0;e.inputs.forEach((M,k)=>{if(M.indexed)if(o==null)p[k]=new ra({_isIndexed:!0,hash:null});else if(s[k])p[k]=new ra({_isIndexed:!0,hash:o[b++]});else try{p[k]=o[b++]}catch(v){p[k]=v}else try{p[k]=l[f++]}catch(v){p[k]=v}if(M.name&&p[M.name]==null){let v=p[k];v instanceof Error?Object.defineProperty(p,M.name,{enumerable:!0,get:()=>{throw Vy(`property ${JSON.stringify(M.name)}`,v)}}):p[M.name]=v}});for(let M=0;M{throw Vy(`index ${M}`,k)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Yi({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:P.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Xi({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=j(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new vd({args:this._abiCoder.decode(a.inputs,"0x"+t.substring(10)),errorFragment:a,name:a.name,signature:a.format(),sighash:this.getSighash(a)}):null}static isInterface(e){return!!(e&&e._isInterface)}};var jy="abstract-provider/5.7.0";var h2=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},x2=new A(jy),lo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){x2.checkAbstract(new.target,$t),R(this,"_isProvider",!0)}getFeeData(){return h2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),a=null,i=null,r=null;return e&&e.baseFeePerGas&&(a=e.baseFeePerGas,r=P.from("1500000000"),i=e.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:a,maxFeePerGas:i,maxPriorityFeePerGas:r,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}};var Hy="abstract-signer/5.7.0";var _n=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new A(Hy),b2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],g2=[A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED],Gt=class{constructor(){ln.checkAbstract(new.target,Gt),R(this,"_isSigner",!0)}getBalance(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let t=yield Ce(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ce(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let t=yield this.populateTransaction(e),a=yield this.signTransaction(t);return yield this.provider.sendTransaction(a)})}getChainId(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)b2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"transaction",e);let t=Te(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&ln.throwArgumentError("provided ENS name resolves to null","tx.to",i),r})),t.to.catch(i=>{}));let a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&ln.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{let i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){let r=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=r,t.maxPriorityFeePerGas=r}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(a&&ln.throwError("network does not support EIP-1559",A.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):ln.throwError("failed to get consistent fee data",A.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(g2.indexOf(i.code)>=0)throw i;return ln.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ln.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ce(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",A.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},sa=class extends Gt{constructor(e,t){super(),R(this,"address",e),R(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{ln.throwError(e,A.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new sa(this.address,e)}};var oe=wn($u()),Wn=wn(Rd());function sr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Hh(a,i??t.path)}},n(t,t.exports),t.exports}function Hh(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Od=E0;function E0(n,e){if(!n)throw new Error(e||"Assertion failed")}E0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=sr(function(n,e){"use strict";var t=e;function a(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var l=[];if(typeof s!="string"){for(var p=0;p>8,M=f&255;b?l.push(b,M):l.push(M)}return l}t.toArray=a;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function r(s){for(var o="",l=0;l(M>>1)-1?C=(M>>1)-D:C=D,k.isubn(C)):C=0,b[v]=C,k.iushrn(1)}return b}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var b=0,M=0,k;l.cmpn(-b)>0||p.cmpn(-M)>0;){var v=l.andln(3)+b&3,C=p.andln(3)+M&3;v===3&&(v=-1),C===3&&(C=-1);var D;(v&1)===0?D=0:(k=l.andln(7)+b&7,(k===3||k===5)&&C===2?D=-v:D=v),f[0].push(D);var N;(C&1)===0?N=0:(k=p.andln(7)+M&7,(k===3||k===5)&&v===2?N=-C:N=C),f[1].push(N),2*b===D+1&&(b=1-b),2*M===N+1&&(M=1-M),l.iushrn(1),p.iushrn(1)}return f}t.getJSF=i;function r(l,p,f){var b="_"+p;l.prototype[p]=function(){return this[b]!==void 0?this[b]:this[b]=f.call(this)}}t.cachedProperty=r;function s(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=s;function o(l){return new oe.default(l,"hex","le")}t.intFromLE=o}),mo=an.getNAF,qh=an.getJSF,ho=an.assert;function Sa(n,e){this.type=n,this.p=new oe.default(e.p,16),this.red=e.prime?oe.default.red(e.prime):oe.default.mont(this.p),this.zero=new oe.default(0).toRed(this.red),this.one=new oe.default(1).toRed(this.red),this.two=new oe.default(2).toRed(this.red),this.n=e.n&&new oe.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var di=Sa;Sa.prototype.point=function(){throw new Error("Not implemented")};Sa.prototype.validate=function(){throw new Error("Not implemented")};Sa.prototype._fixedNafMul=function(e,t){ho(e.precomputed);var a=e._getDoubles(),i=mo(t,1,this._bitLength),r=(1<=o;p--)l=(l<<1)+i[p];s.push(l)}for(var f=this.jpoint(null,null,null),b=this.jpoint(null,null,null),M=r;M>0;M--){for(o=0;o=0;l--){for(var p=0;l>=0&&s[l]===0;l--)p++;if(l>=0&&p++,o=o.dblp(p),l<0)break;var f=s[l];ho(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(r[f-1>>1]):o=o.mixedAdd(r[-f-1>>1].neg()):f>0?o=o.add(r[f-1>>1]):o=o.add(r[-f-1>>1].neg())}return e.type==="affine"?o.toP():o};Sa.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,b,M;for(f=0;f=1;f-=2){var v=f-1,C=f;if(s[v]!==1||s[C]!==1){l[v]=mo(a[v],s[v],this._bitLength),l[C]=mo(a[C],s[C],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[C].length,p);continue}var D=[t[v],null,null,t[C]];t[v].y.cmp(t[C].y)===0?(D[1]=t[v].add(t[C]),D[2]=t[v].toJ().mixedAdd(t[C].neg())):t[v].y.cmp(t[C].y.redNeg())===0?(D[1]=t[v].toJ().mixedAdd(t[C]),D[2]=t[v].add(t[C].neg())):(D[1]=t[v].toJ().mixedAdd(t[C]),D[2]=t[v].toJ().mixedAdd(t[C].neg()));var N=[-3,-1,-5,-7,0,7,5,1,3],F=qh(a[v],a[C]);for(p=Math.max(F[0].length,p),l[v]=new Array(p),l[C]=new Array(p),b=0;b=0;f--){for(var ye=0;f>=0;){var te=!0;for(b=0;b=0&&ye++,q=q.dblp(ye),f<0)break;for(b=0;b0?M=o[b][ae-1>>1]:ae<0&&(M=o[b][-ae-1>>1].neg()),M.type==="affine"?q=q.mixedAdd(M):q=q.add(M))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1};yn.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],i=this,r=0;r=0&&(k=p,v=f),b.negative&&(b=b.neg(),M=M.neg()),k.negative&&(k=k.neg(),v=v.neg()),[{a:b,b:M},{a:k,b:v}]};fn.prototype._endoSplit=function(e){var t=this.endo.basis,a=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),s=a.b.neg().mul(e).divRound(this.n),o=r.mul(a.a),l=s.mul(i.a),p=r.mul(a.b),f=s.mul(i.b),b=e.sub(o).sub(l),M=p.add(f).neg();return{k1:b,k2:M}};fn.prototype.pointFromX=function(e,t){e=new oe.default(e,16),e.red||(e=e.toRed(this.red));var a=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=a.redSqrt();if(i.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)};fn.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,a=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return a.redSqr().redISub(r).cmpn(0)===0};fn.prototype._endoWnafMulAdd=function(e,t,a){for(var i=this._endoWnafT1,r=this._endoWnafT2,s=0;s":""};Mt.prototype.isInfinity=function(){return this.inf};Mt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var a=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,i)};Mt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,a=this.x.redSqr(),i=e.redInvm(),r=a.redAdd(a).redIAdd(a).redIAdd(t).redMul(i),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)};Mt.prototype.getX=function(){return this.x.fromRed()};Mt.prototype.getY=function(){return this.y.fromRed()};Mt.prototype.mul=function(e){return e=new oe.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Mt.prototype.mulAdd=function(e,t,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.prototype.jmulAdd=function(e,t,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)};Mt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Mt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var a=this.precomputed,i=function(r){return r.neg()};t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(i)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(i)}}}return t};Mt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Rt(n,e,t,a){di.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&a===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new oe.default(0)):(this.x=new oe.default(e,16),this.y=new oe.default(t,16),this.z=new oe.default(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Bd(Rt,di.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Rt(this,e,t,a)};Rt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),a=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(a,i)};Rt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),a=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(a),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(a.redMul(this.z)),l=i.redSub(r),p=s.redSub(o);if(l.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),b=f.redMul(l),M=i.redMul(f),k=p.redSqr().redIAdd(b).redISub(M).redISub(M),v=p.redMul(M.redISub(k)).redISub(s.redMul(b)),C=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(k,v,C)};Rt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,i=e.x.redMul(t),r=this.y,s=e.y.redMul(t).redMul(this.z),o=a.redSub(i),l=r.redSub(s);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=o.redSqr(),f=p.redMul(o),b=a.redMul(p),M=l.redSqr().redIAdd(f).redISub(b).redISub(b),k=l.redMul(b.redISub(M)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(M,k,v)};Rt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var fo=sr(function(n,e){"use strict";var t=e;t.base=di,t.short=zh,t.mont=null,t.edwards=null}),co=sr(function(n,e){"use strict";var t=e,a=an.assert;function i(o){o.type==="short"?this.curve=new fo.short(o):o.type==="edwards"?this.curve=new fo.edwards(o):this.curve=new fo.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function r(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var p=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:p}),p}})}r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Wn.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Wn.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Wn.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Wn.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Wn.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wn.default.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wn.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ia(n){if(!(this instanceof Ia))return new Ia(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Od(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var M0=Ia;Ia.prototype._init=function(e,t,a){var i=e.concat(t).concat(a);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(a||[])),this._reseed=1};Ia.prototype.generate=function(e,t,a,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=a,a=t,t=null),a&&(a=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Kh=an.assert;function xo(n,e){if(n instanceof xo)return n;this._importDER(n,e)||(Kh(n.r&&n.s,"Signature without r or s"),this.r=new oe.default(n.r,16),this.s=new oe.default(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var bo=xo;function Wh(){this.place=0}function Pd(n,e){var t=n[e.place++];if(!(t&128))return t;var a=t&15;if(a===0||a>4)return!1;for(var i=0,r=0,s=e.place;r>>=0;return i<=127?!1:(e.place=s,i)}function A0(n){for(var e=0,t=n.length-1;!n[e]&&!(n[e+1]&128)&&e>>3);for(n.push(t|128);--t;)n.push(e>>>(t<<3)&255);n.push(e)}xo.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),a[0]&128&&(a=[0].concat(a)),t=A0(t),a=A0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Nd(i,t.length),i=i.concat(t),i.push(2),Nd(i,a.length);var r=i.concat(a),s=[48];return Nd(s,r.length),s=s.concat(r),an.encode(s,e)};var Jh=function(){throw new Error("unsupported")},C0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(C0(Object.prototype.hasOwnProperty.call(co,n),"Unknown curve "+n),n=co[n]),n instanceof co.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var $h=pn;pn.prototype.keyPair=function(e){return new Fd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Fd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Fd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new M0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Jh(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),i=this.n.sub(new oe.default(2));;){var r=new oe.default(t.generate(a));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.prototype._truncateToN=function(e,t){var a=e.byteLength()*8-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};pn.prototype.sign=function(e,t,a,i){typeof a=="object"&&(i=a,a=null),i||(i={}),t=this.keyFromPrivate(t,a),e=this._truncateToN(new oe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new M0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new oe.default(1)),f=0;;f++){var b=i.k?i.k(f):new oe.default(l.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var M=this.g.mul(b);if(!M.isInfinity()){var k=M.getX(),v=k.umod(this.n);if(v.cmpn(0)!==0){var C=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var D=(M.getY().isOdd()?1:0)|(k.cmp(v)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),D^=1),new bo({r:v,s:C,recoveryParam:D})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new oe.default(e,16)),a=this.keyFromPublic(a,i),t=new bo(t,"hex");var r=t.r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),l=o.mul(e).umod(this.n),p=o.mul(r).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){C0((3&t)===t,"The recovery param is more than two bits"),e=new bo(e,a);var i=this.n,r=new oe.default(n),s=e.r,o=e.s,l=t&1,p=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),b=i.sub(r).mul(f).umod(i),M=o.mul(f).umod(i);return this.g.mulAdd(b,s,M)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new bo(e,a),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var r;try{r=this.recoverPubKey(n,e,i)}catch{continue}if(r.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var Qh=sr(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=fo,t.curves=co,t.ec=$h,t.eddsa=null}),I0=Qh.ec;var S0="signing-key/5.7.0";var Ud=new A(S0),Ld=null;function Jn(){return Ld||(Ld=new I0("secp256k1")),Ld}var cn=class{constructor(e){R(this,"curve","secp256k1"),R(this,"privateKey",j(e)),Pt(this.privateKey)!==32&&Ud.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=Jn().keyFromPrivate(B(this.privateKey));R(this,"publicKey","0x"+t.getPublic(!1,"hex")),R(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),R(this,"_isSigningKey",!0)}_addPoint(e){let t=Jn().keyFromPublic(B(this.publicKey)),a=Jn().keyFromPublic(B(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(B(this.privateKey)),a=B(e);a.length!==32&&Ud.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{canonical:!0});return Ln({recoveryParam:i.recoveryParam,r:fe("0x"+i.r.toString(16),32),s:fe("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=Jn().keyFromPrivate(B(this.privateKey)),a=Jn().keyFromPublic(B(Wr(e)));return fe("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function go(n,e){let t=Ln(e),a={r:B(t.r),s:B(t.s)};return"0x"+Jn().recoverPubKey(B(n),a,t.recoveryParam).encode("hex",!1)}function Wr(n,e){let t=B(n);if(t.length===32){let a=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?j(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):j(t)}return Ud.throwArgumentError("invalid public or private key","key","[REDACTED]")}var R0="transactions/5.7.0";var Lt=new A(R0),To;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(To||(To={}));function jd(n){return n==="0x"?null:pe(n)}function Ft(n){return n==="0x"?zi:P.from(n)}var Xh=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Yh={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Wr(n);return pe(Me(le(Me(e,1)),12))}function li(n,e){return mn(go(B(n),e))}function rn(n,e){let t=Zt(P.from(n).toHexString());return t.length>32&&Lt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Vd(n,e){return{address:pe(n),storageKeys:(e||[]).map((t,a)=>(Pt(t)!==32&&Lt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Lt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Vd(t[0],t[1])):Vd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Vd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function P0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function N0(n,e){if(n.gasPrice!=null){let a=P.from(n.gasPrice),i=P.from(n.maxFeePerGas||0);a.eq(i)||Lt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",ia(t)])}function D0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",ia(t)])}function Zh(n,e){ji(n,Yh);let t=[];Xh.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=B(j(o,l)),s.length&&o.length!==s.length&&o.length>0&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(j(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Lt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ta(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(j(a)),t.push("0x"),t.push("0x")),!e)return ia(t);let i=Ln(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(j(r)),t.push(Zt(B(i.r))),t.push(Zt(B(i.s))),ia(t)}function Jr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Lt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Zh(n,e);switch(n.type){case 1:return D0(n,e);case 2:return N0(n,e);default:break}return Lt.throwError(`unsupported transaction type: ${n.type}`,A.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function O0(n,e,t){try{let a=Ft(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Lt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=fe(e[1],32),n.s=fe(e[2],32);try{let a=le(t(n));n.from=li(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function ex(n){let e=Vr(n.slice(1));e.length!==9&&e.length!==12&&Lt.throwArgumentError("invalid component count for transaction type: 2","payload",j(n));let t=Ft(e[2]),a=Ft(e[3]),i={type:2,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ft(e[4]),to:jd(e[5]),value:Ft(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=le(n),O0(i,e.slice(9),N0)),i}function tx(n){let e=Vr(n.slice(1));e.length!==8&&e.length!==11&&Lt.throwArgumentError("invalid component count for transaction type: 1","payload",j(n));let t={type:1,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),gasPrice:Ft(e[2]),gasLimit:Ft(e[3]),to:jd(e[4]),value:Ft(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=le(n),O0(t,e.slice(8),D0)),t}function nx(n){let e=Vr(n);e.length!==9&&e.length!==6&&Lt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ft(e[0]).toNumber(),gasPrice:Ft(e[1]),gasLimit:Ft(e[2]),to:jd(e[3]),value:Ft(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=P.from(e[6]).toNumber()}catch{return t}if(t.r=fe(e[7],32),t.s=fe(e[8],32),P.from(t.r).isZero()&&P.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(j(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=le(ia(i));try{t.from=li(r,{r:j(t.r),s:j(t.s),recoveryParam:a})}catch{}t.hash=le(n)}return t.type=null,t}function vo(n){let e=B(n);if(e[0]>127)return nx(e);switch(e[0]){case 1:return tx(e);case 2:return ex(e);default:break}return Lt.throwError(`unsupported transaction type: ${e[0]}`,A.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var B0="contracts/5.7.0";var Ra=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ie=new A(B0),ax={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function wo(n,e){return Ra(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return pe(t)}catch{}n||Ie.throwError("a provider or signer is needed to resolve ENS names",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function $r(n,e,t){return Ra(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>$r(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield wo(n,e):t.type==="tuple"?yield $r(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>$r(n,a,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",A.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Ao(n,e,t){return Ra(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=Te(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ce({override:wo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>Ra(this,void 0,void 0,function*(){return pe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=wo(n.provider,a.from));let i=yield Ce({args:$r(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ce(a)||{}}),r=n.interface.encodeFunctionData(e,i.args),s={data:r,to:i.address},o=i.overrides;if(o.nonce!=null&&(s.nonce=P.from(o.nonce).toNumber()),o.gasLimit!=null&&(s.gasLimit=P.from(o.gasLimit)),o.gasPrice!=null&&(s.gasPrice=P.from(o.gasPrice)),o.maxFeePerGas!=null&&(s.maxFeePerGas=P.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=P.from(o.maxPriorityFeePerGas)),o.from!=null&&(s.from=o.from),o.type!=null&&(s.type=o.type),o.accessList!=null&&(s.accessList=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=B(r);for(let b=0;ba[p]!=null);return l.length&&Ie.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,A.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function ix(n,e){return function(...t){return Ao(n,e,t)}}function rx(n,e){let t=n.signer||n.provider;return function(...a){return Ra(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",A.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Ao(n,e,a);return yield t.estimateGas(i)})}}function L0(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(r),o=null;try{o=n.interface.parseLog(r)}catch{}return o&&(s.args=o.args,s.decode=(l,p)=>n.interface.decodeEventLog(o.eventFragment,l,p),s.event=o.name,s.eventSignature=o.signature),s.removeListener=()=>n.provider,s.getBlock=()=>n.provider.getBlock(i.blockHash),s.getTransaction=()=>n.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function U0(n,e,t){let a=n.signer||n.provider;return function(...i){return Ra(this,void 0,void 0,function*(){let r;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){let l=Te(i.pop());l.blockTag!=null&&(r=yield l.blockTag),delete l.blockTag,i.push(l)}n.deployTransaction!=null&&(yield n._deployed(r));let s=yield Ao(n,e,i),o=yield a.call(s,r);try{let l=n.interface.decodeFunctionResult(e,o);return t&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===A.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function sx(n,e){return function(...t){return Ra(this,void 0,void 0,function*(){n.signer||Ie.throwError("sending a transaction requires a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Ao(n,e,t),i=yield n.signer.sendTransaction(a);return L0(n,i),i})}}function F0(n,e,t){return e.constant?U0(n,e,t):sx(n,e)}function V0(n){return n.address&&(n.topics==null||n.topics.length===0)?"*":(n.address||"*")+"@"+(n.topics?n.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}var pi=class{constructor(e,t){R(this,"tag",e),R(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(a=>t||a.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){let t=this.listenerCount();return this._listeners=this._listeners.filter(a=>{let i=e.slice();return setTimeout(()=>{a.listener.apply(this,i)},0),!a.once}),t}prepareEvent(e){}getEmit(e){return[e]}},Hd=class extends pi{constructor(){super("error",null)}},_o=class extends pi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Ie.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(V0(r),r),R(this,"address",e),R(this,"interface",t),R(this,"fragment",a)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,a)=>this.interface.decodeEventLog(this.fragment,t,a);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){let t=qi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},ko=class extends pi{constructor(e,t){super("*",{address:e}),R(this,"address",e),R(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},or=class{constructor(e,t,a){R(this,"interface",mt(new.target,"getInterface")(t)),a==null?(R(this,"provider",null),R(this,"signer",null)):Gt.isSigner(a)?(R(this,"provider",a.provider||null),R(this,"signer",a)):$t.isProvider(a)?(R(this,"provider",a),R(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",a),R(this,"callStatic",{}),R(this,"estimateGas",{}),R(this,"functions",{}),R(this,"populateTransaction",{}),R(this,"filters",{});{let s={};Object.keys(this.interface.events).forEach(o=>{let l=this.interface.events[o];R(this.filters,o,(...p)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,p)})),s[l.name]||(s[l.name]=[]),s[l.name].push(o)}),Object.keys(s).forEach(o=>{let l=s[o];l.length===1?R(this.filters,o,this.filters[l[0]]):Ie.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(R(this,"_runningEvents",{}),R(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),R(this,"address",e),this.provider)R(this,"resolvedAddress",wo(this.provider,e));else try{R(this,"resolvedAddress",Promise.resolve(pe(e)))}catch{Ie.throwError("provider is required to use ENS name as contract address",A.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});let i={},r={};Object.keys(this.interface.functions).forEach(s=>{let o=this.interface.functions[s];if(r[s]){Ie.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}r[s]=!0;{let l=o.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&R(this,s,F0(this,o,!0)),this.functions[s]==null&&R(this.functions,s,F0(this,o,!1)),this.callStatic[s]==null&&R(this.callStatic,s,U0(this,o,!0)),this.populateTransaction[s]==null&&R(this.populateTransaction,s,ix(this,o)),this.estimateGas[s]==null&&R(this.estimateGas,s,rx(this,o))}),Object.keys(i).forEach(s=>{let o=i[s];if(o.length>1)return;s=s.substring(1);let l=o[0];try{this[s]==null&&R(this,s,this[l])}catch{}this.functions[s]==null&&R(this.functions,s,this.functions[l]),this.callStatic[s]==null&&R(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&R(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&R(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return si(e)}static getInterface(e){return Ma.isInterface(e)?e:new Ma(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&Ie.throwError("contract not deployed",A.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=Te(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new sa(e,this.provider));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&R(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ra.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Hd);if(e==="event")return this._normalizeRunningEvent(new pi("event",null));if(e==="*")return this._normalizeRunningEvent(new ko(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _o(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);return this._normalizeRunningEvent(new _o(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new pi(V0(t),t))}return this._normalizeRunningEvent(new ko(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,a){let i=ct(t);return i.removeListener=()=>{!a||(e.removeListener(a),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,a){if(this.provider||Ie.throwError("events require a provider or a signer with a provider",A.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,a),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let i=r=>{let s=this._wrapEvent(e,r,t);if(s.decodeError==null)try{let o=e.getEmit(s);this.emit(e.filter,...o)}catch(o){s.decodeError=o.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,a){let i=this._getRunningEvent(e),r=Te(i.filter);return typeof t=="string"&&Z(t,32)?(a!=null&&Ie.throwArgumentError("cannot specify toBlock with blockhash","toBlock",a),r.blockHash=t):(r.fromBlock=t??0,r.toBlock=a??"latest"),this.provider.getLogs(r).then(s=>s.map(o=>this._wrapEvent(i,o,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;let a=this._getRunningEvent(e),i=a.run(t)>0;return this._checkRunningEvents(a),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,a)=>t+this._runningEvents[a].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){let t=[];for(let a in this._runningEvents)this._runningEvents[a].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(let a in this._runningEvents){let i=this._runningEvents[a];i.removeAllListeners(),this._checkRunningEvents(i)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let a=this._getRunningEvent(e);return a.removeListener(t),this._checkRunningEvents(a),this}removeListener(e,t){return this.off(e,t)}},ue=class extends or{},yi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=j(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!Z(i)||i.length%2)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),a&&!Gt.isSigner(a)&&Ie.throwArgumentError("invalid signer","signer",a),R(this,"bytecode",i),R(this,"interface",mt(new.target,"getInterface")(e)),R(this,"signer",a||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=Te(e.pop());for(let a in t)if(!ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.value&&!P.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=j(de([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Ra(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let a=yield $r(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return L0(o,r),R(o,"deployTransaction",r),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&Ie.throwError("missing compiler output",A.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));let a=e.abi,i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(a,i,t)}static getInterface(e){return ue.getInterface(e)}static getContractAddress(e){return si(e)}static getContract(e,t,a){return new ue(e,t,a)}};var Eo=class{constructor(e){R(this,"alphabet",e),R(this,"base",e.length),R(this,"_alphabetMap",{}),R(this,"_leader",e.charAt(0));for(let t=0;t0;)a.push(s%this.base),s=s/this.base|0}let i="";for(let r=0;t[r]===0&&r=0;--r)i+=this.alphabet[a[r]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let a=0;a>=8;for(;r>0;)t.push(r&255),r>>=8}for(let a=0;e[a]===this._leader&&a>24&255,l[e.length+1]=b>>16&255,l[e.length+2]=b>>8&255,l[e.length+3]=b&255;let M=B(pa(i,n,l));r||(r=M.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(M);for(let C=1;C=256)throw new Error("Depth too large!");return K0(de([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",j(this.depth),this.parentFingerprint,fe(j(this.index),4),this.chainCode,this.privateKey!=null?de(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(dr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~lr));let a=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(B(this.privateKey),1),t&&(t+="'")}else a.set(B(this.publicKey));for(let b=24;b>=0;b-=8)a[33+(b>>3)]=e>>24-b&255;let i=B(pa($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Mo(P.from(r).add(this.privateKey).mod(lx)):l=new cn(j(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(dr,o,l,this.fingerprint,Mo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=lr)throw new Error("invalid path index - "+r);a=a._derive(lr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=lr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=B(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=B(pa($n.sha512,px,a));return new Ct(dr,Mo(i.slice(0,32)),null,"0x00000000",Mo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Kd(a),e=mi(pr(e,a),a),Ct._fromSeed(Wd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=la.decode(e);(t.length!==82||K0(t.slice(0,78))!==e)&&Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=j(t.slice(5,9)),r=parseInt(j(t.slice(9,13)).substring(2),16),s=j(t.slice(13,45)),o=t.slice(45,78);switch(j(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(dr,null,j(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(dr,j(o.slice(1)),null,i,s,r,a,null)}return Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Wd(n,e){e||(e="");let t=ge("mnemonic"+e,qt.NFKD);return fi(ge(n,qt.NFKD),t,2048,64,"sha512")}function pr(n,e){e=Kd(e),Yr.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=B(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=W0(s);if((B(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return j(a.slice(0,r/8))}function mi(n,e){if(e=Kd(e),n=B(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&yx(8-a)),a+=3);let i=n.length/4,r=B(Xt(n))[0]&W0(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function J0(n,e){try{return pr(n,e),!0}catch{}return!1}function $0(n){return(typeof n!="number"||n<0||n>=lr||n%1)&&Yr.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Q0="random/5.7.0";var Jd=new A(Q0);function fx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var X0=fx(),Co=X0.crypto||X0.msCrypto;(!Co||!Co.getRandomValues)&&(Jd.warn("WARNING: Missing strong random number source"),Co={getRandomValues:function(n){return Jd.throwError("no secure random source avaialble",A.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Jd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Co.getRandomValues(e),B(e)}function Zr(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var Xd=wn(Qd());var Io="json-wallets/5.7.0";function fa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),B(n)}function yr(n,e){for(n=String(n);n.length{D=B(D);let N=D.slice(0,16),F=D.slice(16,32),U=D.slice(32,64),G=new ca.default.Counter(b),q=new ca.default.ModeOfOperation.ctr(N,G),K=B(q.encrypt(i)),ye=le(de([F,K])),te={address:n.address.substring(2).toLowerCase(),id:Z0(M),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:j(b).substring(2)},ciphertext:j(K).substring(2),kdf:"scrypt",kdfparams:{salt:j(f).substring(2),n:k,dklen:32,p:C,r:v},mac:ye.substring(2)}};if(s){let ae=Qn(16),Re=new ca.default.Counter(ae),ie=new ca.default.ModeOfOperation.ctr(U,Re),we=B(ie.encrypt(s)),E=new Date,u=E.getUTCFullYear()+"-"+yr(E.getUTCMonth()+1,2)+"-"+yr(E.getUTCDate(),2)+"T"+yr(E.getUTCHours(),2)+"-"+yr(E.getUTCMinutes(),2)+"-"+yr(E.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:j(ae).substring(2),mnemonicCiphertext:j(we).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(te)})}function df(n,e,t){if(So(n)){t&&t(0);let a=Zd(n,e);return t&&t(1),Promise.resolve(a)}return Ro(n)?uf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function lf(n,e){if(So(n))return Zd(n,e);if(Ro(n))return of(n,e);throw new Error("invalid JSON wallet")}var pf="wallet/5.7.0";var yf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fr=new A(pf);function bx(n){return n!=null&&Z(n.privateKey,32)&&n.address!=null}function gx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),bx(e)){let a=new cn(e.privateKey);if(R(this,"_signingKey",()=>a),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&fr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),gx(e)){let i=e.mnemonic;R(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ya,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&fr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else R(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&fr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),R(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);R(this,"_signingKey",()=>a)}R(this,"_mnemonic",()=>null),R(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&fr.throwArgumentError("invalid provider","provider",t),R(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(pe(t.from)!==this.address&&fr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(le(Jr(t)));return Jr(t,a)})}signMessage(e){return yf(this,void 0,void 0,function*(){return Pr(this._signingKey().signDigest(Qi(e)))})}_signTypedData(e,t,a){return yf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&fr.throwError("cannot resolve ENS names without a provider",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Pr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),il(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Me(le(de([t,e.extraEntropy])),0,16)));let a=mi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return df(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(lf(e,t))}static fromMnemonic(e,t,a){return t||(t=ya),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function ff(n,e){return li(Qi(n),e)}function cf(n,e,t,a){return li(bt.hash(n,e,t),a)}var Da={};Li(Da,{AlchemyProvider:()=>gr,AlchemyWebSocketProvider:()=>ps,AnkrProvider:()=>ys,BaseProvider:()=>Yn,CloudflareProvider:()=>fs,EtherscanProvider:()=>cs,FallbackProvider:()=>hs,Formatter:()=>J,InfuraProvider:()=>vr,InfuraWebSocketProvider:()=>bs,IpcProvider:()=>xl,JsonRpcBatchProvider:()=>Wo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>xr,NodesmithProvider:()=>gs,PocketProvider:()=>Ts,Provider:()=>$t,Resolver:()=>hr,StaticJsonRpcProvider:()=>ls,UrlJsonRpcProvider:()=>It,Web3Provider:()=>vs,WebSocketProvider:()=>xa,getDefaultProvider:()=>Jo,getNetwork:()=>ts,isCommunityResourcable:()=>ol,isCommunityResource:()=>is,showThrottleMessage:()=>Xn});var mf="networks/5.7.1";var hf=new A(mf);function Tx(n){return n&&typeof n.renetwork=="function"}function ma(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ma(t)},e}function Do(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Do(n,a)},t}var xf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ma("homestead")},bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ma("ropsten")},gf={chainId:63,name:"classicMordor",_defaultProvider:Do("https://www.ethercluster.com/mordor","classicMordor")},No={unspecified:{chainId:0,name:"unspecified"},homestead:xf,mainnet:xf,morden:{chainId:2,name:"morden"},ropsten:bf,testnet:bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ma("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ma("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ma("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ma("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Do("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:gf,classicTestnet:gf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Do("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ma("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ma("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ts(n){if(n==null)return null;if(typeof n=="number"){for(let a in No){let i=No[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=No[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=No[n.name];if(!e)return typeof n.chainId!="number"&&hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Tx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Tf="web/5.7.1";var vx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function vf(n,e){return vx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:B(new Uint8Array(i))}})}var wx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new A(Tf);function wf(n){return new Promise(e=>{setTimeout(e,n)})}function Pa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ta(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return j(n)}return n}function _x(n){return ge(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function rl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,b=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(b=n.timeout),n.headers)for(let N in n.headers)o[N.toLowerCase()]={key:N,value:String(n.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",A.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let N=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+$i(ge(N))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=Te(n.fetchOptions))}let M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),k=l?l.match(M):null;if(k)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":k[1]||"text/plain"},body:k[2]?Ji(k[3]):_x(k[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){In.throwError("processing response error",A.errors.SERVER_ERROR,{body:Pa(k[1],k[2]),error:N,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(N=>{let F=o[N];v[F.key]=F.value}),p.headers=v;let C=function(){let N=null;return{promise:new Promise(function(G,q){b&&(N=setTimeout(()=>{N!=null&&(N=null,q(In.makeError("timeout",A.errors.TIMEOUT,{requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:l})))},b))}),cancel:function(){N!=null&&(clearTimeout(N),N=null)}}}(),D=function(){return wx(this,void 0,void 0,function*(){for(let N=0;N=300)&&(C.cancel(),In.throwError("bad response",A.errors.SERVER_ERROR,{status:F.statusCode,headers:F.headers,body:Pa(U,F.headers?F.headers["content-type"]:null),requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let G=yield t(U,F);return C.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",A.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ge(e);let r=typeof n=="string"?{url:n}:Te(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=Te(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return rl(n,i,a)}function Rn(n,e){return e||(e={}),e=Te(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(f){s()&&a(f)})}p()})}var pl=wn(Ef());var _e="providers/5.7.2";var as=new A(_e),J=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:J.allowNull(this.accessList.bind(this),null),blockHash:J.allowNull(s,null),blockNumber:J.allowNull(l,null),transactionIndex:J.allowNull(l,null),confirmations:J.allowNull(l,null),from:t,gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),gasLimit:a,to:J.allowNull(t,null),value:a,nonce:l,data:r,r:J.allowNull(this.uint256),s:J.allowNull(this.uint256),v:J.allowNull(l),creates:J.allowNull(t,null),raw:J.allowNull(r)},e.transactionRequest={from:J.allowNull(t),nonce:J.allowNull(l),gasLimit:J.allowNull(a),gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),to:J.allowNull(t),value:J.allowNull(a),data:J.allowNull(f),type:J.allowNull(l),accessList:J.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:J.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:J.allowNull(this.address,null),from:J.allowNull(this.address,null),contractAddress:J.allowNull(t,null),transactionIndex:l,root:J.allowNull(o),gasUsed:a,logsBloom:J.allowNull(r),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:J.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:J.allowNull(a),status:J.allowNull(l),type:p},e.block={hash:J.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:J.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:J.allowNull(t),extraData:r,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(a)},e.blockWithTransactions=Te(e.block),e.blockWithTransactions.transactions=J.allowNull(J.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:J.allowNull(i,void 0),toBlock:J.allowNull(i,void 0),blockHash:J.allowNull(s,void 0),address:J.allowNull(t,void 0),topics:J.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:J.allowNull(l),blockHash:J.allowNull(s),transactionIndex:l,removed:J.allowNull(this.boolean.bind(this)),address:t,data:J.allowFalsish(r,"0x"),topics:J.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:P.from(e).toNumber()}type(e){return e==="0x"||e==null?0:P.from(e).toNumber()}bigNumber(e){return P.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),Z(e))?e.toLowerCase():as.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Me(e,12));return t===Ys?null:t}contractAddress(e){return si(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Z(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Pt(a)!==32?as.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=P.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!Z(e))throw new Error("invalid uint256");return fe(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=J.check(t,e);return i._difficulty=a==null?null:P.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return J.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&P.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=J.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;Z(a)&&(a=P.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),Z(a)&&(a=P.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return vo(e)}receiptLog(e){return J.check(this.formats.receiptLog,e)}receipt(e){let t=J.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=P.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&as.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):as.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&as.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return J.check(this.formats.filter,e)}filterLog(e){return J.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function ol(n){return n&&typeof n.isCommunityResource=="function"}function is(n){return ol(n)&&n.isCommunityResource()}var Mf=!1;function Xn(){Mf||(Mf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var re=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ce=new A(_e),Rx=10;function Cf(n){return n==null?"null":(Pt(n)!==32&&ce.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function If(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Cf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Cf(e)}).join("&")}function Px(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function mr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+If(n);if(lo.isForkEvent(n))throw ce.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+If(n.topics||[])}throw new Error("invalid event - "+n)}function rs(){return new Date().getTime()}function Sf(n){return new Promise(e=>{setTimeout(e,n)})}var Nx=["block","network","pending","poll"],yl=class{constructor(e,t,a){R(this,"tag",e),R(this,"listener",t),R(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=Px(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Nx.indexOf(this.tag)>=0}},Dx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ul(n){return fe(P.from(n).toHexString(),32)}function Rf(n){return la.encode(de([n,Me(Xt(Xt(n)),0,4)]))}var Df=new RegExp("^(ipfs)://(.*)$","i"),Pf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Df,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lo(n,e){try{return Jt(ss(n,e))}catch{}return null}function ss(n,e){if(n==="0x")return null;let t=P.from(Me(n,e,e+32)).toNumber(),a=P.from(Me(n,t,t+32)).toNumber();return Me(n,t+32,t+32+a)}function dl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):ce.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Nf(n){let e=B(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Ox(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Of(n){let e=[],t=0;for(let a=0;aP.from(e).eq(1)).catch(e=>{if(e.code===A.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return re(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Of([Gr(this.name),a.data])]));try{let r=yield this.provider.call(a);return B(r).length%32===4&&ce.throwError("resolver threw error",A.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ss(r,0)),r}catch(r){if(r.code===A.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return re(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ss(a,0):null})}_getAddress(e,t){let a=Dx[String(e)];if(a==null&&ce.throwError(`unsupported coin type: ${e}`,A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=B(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Rf(de([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Rf(de([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=pl.default.toWords(i.slice(2));return o.unshift(s),pl.default.encode(a.prefix,o)}}return null}getAddress(e){return re(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Ki?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===A.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",ul(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&ce.throwError("invalid or unsupported coin data",A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return re(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return ce.throwError("invalid or unsupported content hash data",A.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return re(this,void 0,void 0,function*(){let t=ge(e);t=de([ul(64),ul(t.length),t]),t.length%32!==0&&(t=de([t,fe("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",j(t));return a==null||a==="0x"?null:Jt(a)})}},ll=null,Bx=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),R(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(R(this,"_network",t),this.emit("network",t,null)):ce.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return re(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ce.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:R(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===A.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ll==null&&(ll=new J),ll}static getNetwork(e){return ts(e??"homestead")}ccipReadFetch(e,t,a){return re(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),b=yield Sn({url:p,errorPassThrough:!0},f,(k,v)=>(k.status=v.statusCode,k));if(b.data)return b.data;let M=b.message||"unknown error";if(b.status>=400&&b.status<500)return ce.throwError(`response not found during CCIP fetch: ${M}`,A.errors.SERVER_ERROR,{url:l,errorMessage:M});s.push(M)}return ce.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,A.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return re(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(rs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=rs(),a=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=rs();return i=P.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return re(this,void 0,void 0,function*(){let e=Bx++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",ce.makeError("network block skew detected",A.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return re(this,void 0,void 0,function*(){return ce.throwError("provider does not support network detection",A.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return re(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Sf(0),this._network;let a=ce.makeError("underlying network changed",A.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=rs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return re(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return re(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(M=>{M()}),!1)},b=M=>{M.confirmations{this.removeListener(e,b)}),i){let M=i.startBlock,k=null,v=C=>re(this,void 0,void 0,function*(){p||(yield Sf(1e3),this.getTransactionCount(i.from).then(D=>re(this,void 0,void 0,function*(){if(!p){if(D<=i.nonce)M=C;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(k==null&&(k=M-3,k{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let M=setTimeout(()=>{f()||o(ce.makeError("timeout exceeded",A.errors.TIMEOUT,{timeout:a}))},a);M.unref&&M.unref(),l.push(()=>{clearTimeout(M)})}})})}getBlockNumber(){return re(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return re(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return P.from(e)}catch(t){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return P.from(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return P.from(i).toNumber()}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return j(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return re(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return j(r)}catch(s){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&ce.throwError("Transaction hash mismatch from Provider.sendTransaction.",A.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>re(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&ce.throwError("transaction failed",A.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>j(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return re(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?P.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?j(r):null))}),this.formatter.transactionRequest(yield Ce(a))})}_getFilter(e){return re(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,a){return re(this,void 0,void 0,function*(){a>=Rx&&ce.throwError("CCIP read exceeded maximum redirections",A.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Me(r,4),o=Me(s,0,32);P.from(o).eq(i)||ce.throwError("CCIP Read sender did not match",A.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=P.from(Me(s,32,64)).toNumber(),f=P.from(Me(s,p,p+32)).toNumber(),b=Me(s,p+32);for(let N=0;Nre(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return re(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return re(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ce.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return re(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new hr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return re(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||ce.throwError("network does not support ENS",A.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return re(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(Z(e))throw a}typeof e!="string"&&ce.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return re(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Lo(yield this.call({to:a,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return re(this,void 0,void 0,function*(){let t=null;if(Z(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new hr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o}try{let o=Lo(yield this.call({to:s,data:"0x691f3431"+Ea(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return ce.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new yl(mr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=mr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=mr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=mr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=mr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=mr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ha=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new A(_e),Fx=["call","estimateGas"];function us(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=Z(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=us(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return us(JSON.parse(n),e)}catch{}return null}function Ff(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=us(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",A.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=us(e.body,!1);r==null&&(r=us(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===A.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",A.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),Fx.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Bf(n){return new Promise(function(e){setTimeout(e,n)})}function Lx(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function os(n){return n&&n.toLowerCase()}var fl={},xr=class extends Gt{constructor(e,t,a){if(super(),e!==fl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),a==null&&(a=0),typeof a=="string"?(R(this,"_address",this.provider.formatter.address(a)),R(this,"_index",null)):typeof a=="number"?(R(this,"_index",a),R(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",A.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new cl(fl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,A.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Te(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=Te(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ha(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",A.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Ff("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ha(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ha(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[j(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),j(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ha(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ha(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},cl=class extends xr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},Ux={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?R(this,"connection",Object.freeze({url:e})):R(this,"connection",Object.freeze(Te(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ha(this,void 0,void 0,function*(){yield Bf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(P.from(e).toNumber())}catch(a){return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new xr(fl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),Lx).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[os(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[os(t.address),t.blockTag]];case"getCode":return["eth_getCode",[os(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[os(t.address),fe(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=os(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ha(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&P.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=Te(t),t.transaction=Te(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return Ff(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return Bf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=Te(Ux);if(t)for(let r in t)t[r]&&(a[r]=!0);ji(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(P.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=j(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var br=null;try{if(br=WebSocket,br==null)throw new Error("inject please")}catch{let e=new A(_e);br=function(){e.throwError("WebSockets not supported in this environment",A.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var ml=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uo=new A(_e),Vx=1,xa=class extends Yt{constructor(e,t){t==="any"&&Uo.throwError("WebSocketProvider does not support 'any' network yet",A.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?R(this,"_websocket",new br(this.connection.url)):R(this,"_websocket",e),R(this,"_requests",{}),R(this,"_subs",{}),R(this,"_subIds",{}),R(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),R(p,"code",s.error.code||null),R(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Uo.throwError("cannot reset events block on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Uo.throwError("cannot set polling interval on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Uo.throwError("cannot set polling on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=Vx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return ml(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=P.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return ml(this,void 0,void 0,function*(){this.websocket.readyState===br.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var jx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ds=new A(_e),ls=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return jx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ds.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ls{constructor(e,t){ds.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{R(this,i,t[i])})}_startPending(){ds.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ds.throwError("API provider does not support signing",A.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ds.throwError("not implemented; sub-classes must override getUrl",A.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Lf=new A(_e),Vo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ps=class extends xa{constructor(e,t){let a=new gr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),R(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Vo}},gr=class extends It{static getWebSocketProvider(e,t){return new ps(e,t)}static getApiKey(e){return e==null?Vo:(e&&typeof e!="string"&&Lf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:Lf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Vo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Vo}};var Hx=new A(_e),jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function qx(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Hx.throwArgumentError("unsupported network","name",n)}var ys=class extends It{isCommunityResource(){return this.apiKey===jo}static getApiKey(e){return e??jo}static getUrl(e,t){t==null&&(t=jo);let a={allowGzip:!0,url:"https://"+qx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var Gx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uf=new A(_e),fs=class extends It{static getApiKey(e){return e!=null&&Uf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:Uf.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Gx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var Ho=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Na=new A(_e);function Vf(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Fn(j(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=j(a),e[t]=a)}return e}function zx(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function jf(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function Hf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function hl(n,e,t){if(n==="call"&&e.code===A.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),Z(r))return r;Na.throwError("missing revert data in call exception",A.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===A.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Na.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Na.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Na.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Na.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var cs=class extends Yn{constructor(e,t){super(e),R(this,"baseUrl",this.getBaseUrl()),R(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Na.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return Ho(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?jf:zx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,b)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||jf);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Ho(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Ho(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>hl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=Vf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("call",r,t.transaction)}}case"estimateGas":{let i=Vf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=Hf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Hf(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Na.throwError("unsupported topic count",A.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Na.throwError("unsupported topic format",A.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var zo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hi=new A(_e);function qo(){return new Date().getTime()}function qf(n){let e=null;for(let t=0;te?null:(a+i)/2}function Tr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(P.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Tr(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Tr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var Kx=1;function zf(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var Wx=[A.errors.CALL_EXCEPTION,A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED,A.errors.UNPREDICTABLE_GAS_LIMIT],Jx=["address","args","errorArgs","errorSignature","method","transaction"];function Go(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function $x(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function Qx(n,e,t){let a=Tr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Gf(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return Gf(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=Te(i),i.confirmations=-1,Tr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=Te(i),i.transactions=i.transactions.map(r=>(r=Te(r),r.confirmations=-1,r)),Tr(i))}:a=function(i){return i==null?null:Tr(i)};break;default:throw new Error("unknown method: "+e)}return $x(a,n.quorum)}function ms(n,e){return zo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function Xx(n,e,t,a){return zo(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&Z(r.fromBlock)||r.toBlock&&Z(r.toBlock))&&(i=yield ms(n,e)),i.getLogs(r)}}return hi.throwError("unknown method error",A.errors.UNKNOWN_ERROR,{method:t,params:a})})}var hs=class extends Yn{constructor(e,t){e.length===0&&hi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=is(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=Te(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=is(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&hi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&hi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=qf(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),R(this,"providerConfigs",Object.freeze(a)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return zo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return qf(e)})}perform(e,t){return zo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=qo(),p=i.filter(k=>k.runner&&l-k.startk+v.weight,0);for(;p{k.staller=null}),k.runner=Xx(k,r,e,t).then(C=>{k.done=!0,k.result=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})},C=>{k.done=!0,k.error=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,null),request:{method:e,params:ct(t)},provider:this}),p+=k.weight}let f=[];i.forEach(k=>{k.done||!k.runner||(f.push(k.runner),k.staller&&f.push(k.staller.getPromise()))}),f.length&&(yield Promise.race(f));let b=i.filter(k=>k.done&&k.error==null);if(b.length>=this.quorum){let k=a(b);if(k!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),k;o||(yield zf(100).getPromise()),o=!1}let M=i.reduce((k,v)=>{if(!v.done||v.error==null)return k;let C=v.error.code;return Wx.indexOf(C)>=0&&(k[C]||(k[C]={error:v.error,weight:0}),k[C].weight+=v.weight),k},{});if(Object.keys(M).forEach(k=>{let v=M[k];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let C=v.error,D={};Jx.forEach(N=>{C[N]!=null&&(D[N]=C[N])}),hi.throwError(C.reason||C.message,k,D)}),i.filter(k=>!k.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),hi.throwError("failed to meet quorum",A.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Go(l)),provider:this})})}};var xl=null;var Ko=new A(_e),xs="84842078b09946638c03157f83405213",bs=class extends xa{constructor(e,t){let a=new vr(e,t),i=a.connection;i.password&&Ko.throwError("INFURA WebSocket project secrets unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),R(this,"apiKey",a.projectId),R(this,"projectId",a.projectId),R(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===xs}},vr=class extends It{static getWebSocketProvider(e,t){return new bs(e,t)}static getApiKey(e){let t={apiKey:xs,projectId:xs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Ko.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Ko.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Ko.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===xs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===xs}};var Wo=class extends Yt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let b=l[f];if(b.error){let M=new Error(b.error.message);M.code=b.error.code,M.data=b.error.data,p.reject(M)}else p.resolve(b.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var bl=new A(_e),Yx="ETHERS_JS_SHARED",gs=class extends It{static getApiKey(e){return e&&typeof e!="string"&&bl.throwArgumentError("invalid apiKey","apiKey",e),e||Yx}static getUrl(e,t){bl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var Kf=new A(_e),Wf="62e1ad51b37b8e00394bda3b",Ts=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Wf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Kf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:Kf.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===Wf}};var Jf=new A(_e),Zx=1;function $f(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:Zx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function e5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var vs=class extends Yt{constructor(e,t){e==null&&Jf.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=e5(e)):e.sendAsync?i=$f(e,e.sendAsync.bind(e)):e.send?i=$f(e,e.send.bind(e)):Jf.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),R(this,"jsonRpcFetchFunc",i),R(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Qf=new A(_e);function Jo(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Yt(n);case"ws":case"wss":return new xa(n);default:Qf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ts(n);return(!t||!t._defaultProvider)&&Qf.throwError("unsupported getDefaultProvider network",A.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:hs,AlchemyProvider:gr,AnkrProvider:ys,CloudflareProvider:fs,EtherscanProvider:cs,InfuraProvider:vr,JsonRpcProvider:Yt,NodesmithProvider:gs,PocketProvider:Ts,Web3Provider:vs,IpcProvider:null},e)}var Y={};Li(Y,{AbiCoder:()=>Wi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>xe,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>ra,Interface:()=>Ma,LogDescription:()=>Xi,Logger:()=>A,ParamType:()=>lt,RLP:()=>Gs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yi,TransactionTypes:()=>To,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>ao,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>rl,_toEscapedUtf8String:()=>ld,accessListify:()=>sn,arrayify:()=>B,base58:()=>la,base64:()=>hd,checkProperties:()=>ji,checkResultErrors:()=>qi,commify:()=>ic,computeAddress:()=>mn,computeHmac:()=>pa,computePublicKey:()=>Wr,concat:()=>de,deepCopy:()=>ct,defaultAbiCoder:()=>Hr,defaultPath:()=>ya,defineReadOnly:()=>R,dnsEncode:()=>Gr,entropyToMnemonic:()=>mi,fetchJson:()=>Sn,formatBytes32String:()=>pd,formatEther:()=>rc,formatUnits:()=>gl,getAccountPath:()=>$0,getAddress:()=>pe,getContractAddress:()=>si,getCreate2Address:()=>dy,getIcapAddress:()=>uy,getJsonWalletAddress:()=>el,getStatic:()=>mt,hashMessage:()=>Qi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Me,hexStripZeros:()=>Zu,hexValue:()=>Fn,hexZeroPad:()=>fe,hexlify:()=>j,id:()=>nn,isAddress:()=>oy,isBytes:()=>on,isBytesLike:()=>ta,isHexString:()=>Z,isValidMnemonic:()=>J0,isValidName:()=>bd,joinSignature:()=>Pr,keccak256:()=>le,mnemonicToEntropy:()=>pr,mnemonicToSeed:()=>Wd,namehash:()=>Ea,nameprep:()=>md,parseBytes32String:()=>yd,parseEther:()=>sc,parseTransaction:()=>vo,parseUnits:()=>Tl,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>li,recoverPublicKey:()=>go,resolveProperties:()=>Ce,ripemd160:()=>Qr,serializeTransaction:()=>Jr,sha256:()=>Xt,sha512:()=>qd,shallowCopy:()=>Te,shuffled:()=>Zr,solidityKeccak256:()=>Zf,solidityPack:()=>$o,soliditySha256:()=>ec,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ge,toUtf8CodePoints:()=>Aa,toUtf8String:()=>Jt,verifyMessage:()=>ff,verifyTypedData:()=>cf,zeroPad:()=>ni});var Xf="solidity/5.7.0";var t5=new RegExp("^bytes([0-9]+)$"),n5=new RegExp("^(u?int)([0-9]*)$"),a5=new RegExp("^(.*)\\[([0-9]*)\\]$"),i5="0000000000000000000000000000000000000000000000000000000000000000",wr=new A(Xf);function Yf(n,e,t){switch(n){case"address":return t?ni(e,32):B(e);case"string":return ge(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ni(e,32):B(e)}let a=n.match(n5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&wr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=P.from(e).toTwos(i),ni(e,i/8)}if(a=n.match(t5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&wr.throwArgumentError("invalid bytes type","type",n),B(e).byteLength!==i&&wr.throwArgumentError(`invalid value for ${n}`,"value",e),t?B((e+i5).substring(0,66)):e}if(a=n.match(a5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&wr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Yf(i,o,!0))}),de(s)}return wr.throwArgumentError("invalid type","type",n)}function $o(n,e){n.length!=e.length&&wr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Yf(a,e[i]))}),j(de(t))}function Zf(n,e){return le($o(n,e))}function ec(n,e){return Xt($o(n,e))}var tc="units/5.7.0";var nc=new A(tc),ac=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ic(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&nc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function gl(n,e){if(typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return Vi(n,e??18)}function Tl(n,e){if(typeof n!="string"&&nc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function rc(n){return gl(n,18)}function sc(n){return Tl(n,18)}var Qo="ethers/5.7.2";var oc=new A(Qo);try{let n=window;n._ethers==null&&(n._ethers=vl)}catch{}var ba;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ba||(ba={}));var uc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(uc||(uc={}));var wl;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(wl||(wl={}));var ws;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(ws||(ws={}));var _l;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(_l||(_l={}));var _s;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(_s||(_s={}));var kl;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(kl||(kl={}));var Al;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Al||(Al={}));var El;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(El||(El={}));var ve;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ve||(ve={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Cl="0x12345678",Ml;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Ml||(Ml={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var ke;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(ke||(ke={}));var Il=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],xi=class{static createInterface(){return new Y.Interface(Il)}static connect(e,t){return new ue(e,Il,t)}};me(xi,"abi",Il);var Sl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],bi=class{static createInterface(){return new Y.Interface(Sl)}static connect(e,t){return new ue(e,Sl,t)}};me(bi,"abi",Sl);var dc=(n,e)=>{throw new Error(`${e}: ${n}`)},Rl=n=>n!=null;var{keccak256:s5,toUtf8Bytes:o5}=Y,{MaxUint256:u5}=ht;var Pl=n=>Y.formatEther(n);var Nl=n=>{let e=n.reduce((t,a)=>t|1<{let e=P.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Rl)},gi=async(n,e,t,a)=>{if(P.from(t).eq(P.from(a)))return u5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return P.from(o)},Oa=n=>s5(o5(n));var _r=async(n,e)=>(await bi.connect(n,e).version()).toNumber(),Dl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Rl);var{hexDataSlice:Ol}=Y,{MaxUint256:d5}=ht,lc=n=>{let e=Ol(n,0,3),t=P.from(Ol(n,4,35)),a=P.from(Ol(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},pc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[P.from(t),d5,r];let o=P.from(ve.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await gi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},l5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>pc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?Zn(n,e,t,a[0],i):l5(n,e,t,a,i):pc(n,e,t,a,i);var{MaxUint256:yc}=ht,{AddressZero:p5}=ht;async function y5(n,e){let t;try{return t=await n.getCapabilityRoles(Y.hexZeroPad(e,4)),Xo(t)}catch{return[]}}async function ks(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:b}=lc(s),M=xi.connect(r,a.signer||a.provider),k=await y5(M,p);if(k.includes(vt.Root)||k.length===0){if(!P.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ve.RootDomain}`);o=yc}else{let{skillId:F}=await e.getDomain(f),U=await n.getChildSkillId(F,b);if(U.eq(l))o=yc;else{let{children:G}=await n.getSkill(l),q=G.findIndex(K=>K.eq(U));if(q<0)throw new Error(`Could not find ${U} as a child of ${l}`);o=P.from(q)}}let{key:v,value:C,branchMask:D,siblings:N}=await t.getReputationWithProofs(l,p5);return{actionCid:o,key:v,value:C,branchMask:D,siblings:N}}var{AddressZero:f5}=ht,ea=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||ba.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||ws[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(P.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=P.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=P.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ea.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,b=await this.colony.getDomain(f);return{domainId:f,skillId:b.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:b})=>b===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?P.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}`;return ea.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}/${f5}/noProof`,s=await ea.fetchReputation(r);return{...s,reputationAmount:P.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(P.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var fc=10,G7=Et(fc),cc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},mc=fc-1;var hc=3,W7=Et(hc),xc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},bc=hc-1;var gc=10,Q7=Et(gc),Tc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},vc=gc-1;var wc=7,Z7=Et(wc),_c={1:[],2:[],3:[],4:[],5:[],6:[]},kc=wc-1;var Ac=8,nk=Et(Ac),Ec={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Mc=Ac-1;var Cc=5,rk=Et(Cc),Ic={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Sc=Cc-1;var Rc=7,uk=Et(Rc),Pc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Nc=Rc-1;var Dc=10,pk=Et(Dc),Oc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Bc=Dc-1;var Fc=14,ck=Et(Fc),Bl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Fl=Fc-1;var Lc=18,c5=Et(Lc),xk=Lc-1;var m5=(n,e)=>{switch(n){case ke.FundingQueue:return cc[e];case ke.IVotingReputation:return Bl[e];case ke.MultisigPermissions:return xc[e];case ke.OneTxPayment:return Tc[e];case ke.ReputationBootstrapper:return _c[e];case ke.StagedExpenditure:return Ic[e];case ke.StakedExpenditure:return Ec[e];case ke.StreamingPayments:return Pc[e];case ke.TokenSupplier:return Oc[e];case ke.VotingReputation:return Bl[e];default:return dc(n,"Could not find extension with name")}},Ti=(n,e,t)=>{let a=m5(n,e);return!!a&&!a.includes(t)};var h5={[ke.FundingQueue]:mc,[ke.IVotingReputation]:Fl,[ke.MultisigPermissions]:bc,[ke.OneTxPayment]:vc,[ke.ReputationBootstrapper]:kc,[ke.StagedExpenditure]:Sc,[ke.StakedExpenditure]:Mc,[ke.StreamingPayments]:Nc,[ke.TokenSupplier]:Bc,[ke.VotingReputation]:Fl};var i6=wn(Uc(),1);var Ib=wn(a6(),1);var pt;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(pt||(pt={}));var ap;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(ap||(ap={}));var qA=(0,i6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),ip={[pt.Annotation]:"Annotation(address,bytes32,string)",[pt.Colony]:"ColonyMetadata(address,string)",[pt.Decision]:"Annotation(address,bytes32,string)",[pt.Domain]:"DomainMetadata(address,uint256,string)",[pt.Misc]:"",[pt.DEFAULT]:""};var zA=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var rp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new Y.Interface(rp)}static connect(e,t){return new ue(e,rp,t)}};me(Tn,"abi",rp);var sp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new Y.Interface(sp)}static connect(e,t){return new ue(e,sp,t)}};me(vn,"abi",sp);var op=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new Y.Interface(op)}static connect(e,t){return new ue(e,op,t)}};me(Ei,"abi",op);var Ru=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],s6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",Db=n=>n.length>1,Pn=class extends yi{constructor(...e){Db(e)?super(...e):super(Ru,s6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Y.Interface(Ru)}static connect(e,t){return new ue(e,Ru,t)}};me(Pn,"bytecode",s6),me(Pn,"abi",Ru);var Cr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Cr||(Cr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:Lb}=ht;async function Ub(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Vb=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await Ub(t)}catch{a=!1}try{await t.nonces(Lb)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Cr.TokenClient,t},up=Vb;var{AddressZero:dp}=ht,Hb=Tn.connect(dp,new Da.BaseProvider(3656691)).interface,qb=Ei.connect(dp,new Da.BaseProvider(3656691)).interface,Gb=vn.connect(dp,new Da.BaseProvider(3656691)).interface;var lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ps=class{static createInterface(){return new Y.Interface(lp)}static connect(e,t){return new ue(e,lp,t)}};Ps.abi=lp;var pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ns=class{static createInterface(){return new Y.Interface(pp)}static connect(e,t){return new ue(e,pp,t)}};Ns.abi=pp;var yp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new ue(e,yp,t)}};Ir.abi=yp;var Mi=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,ip[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Dl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Kb,solidityKeccak256:Wb,splitSignature:Jb}=Y,Ci=class extends Mi{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ba.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=Wb(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=Kb(l),f=await a.signMessage(p),{r:b,s:M,v:k}=Jb(f),v={target:t,payload:e,userAddress:s,r:b,s:M,v:k};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ee=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Pu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=ve.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ii=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new ue(e,fp,t)}};Ii.abi=fp;var cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Si=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new ue(e,cp,t)}};Si.abi=cp;var mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new ue(e,mp,t)}};Ri.abi=mp;var hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new Y.Interface(hp)}static connect(e,t){return new ue(e,hp,t)}};Pi.abi=hp;var xp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new Y.Interface(xp)}static connect(e,t){return new ue(e,xp,t)}};Ni.abi=xp;var bp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new Y.Interface(bp)}static connect(e,t){return new ue(e,bp,t)}};Di.abi=bp;var{AddressZero:t1}=ht,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===t1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||ve.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((k,v)=>r[k].localeCompare(r[v]));let f=p.map(k=>r[k]),b=p.map(k=>l[k]),M=p.map(k=>o[k]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[k,v]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[k,v,C,D,f,M,b,s,ve.SkillIgnore]},async k=>({...ee("OneTxPaymentMade",k)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.OneTxPayment),t],async a=>({...ee("ExtensionUpgraded",a)}))}},La=Dn;La.supportedVersions=[{version:3,factory:Pi},{version:4,factory:Ni},{version:5,factory:Di}],La.extensionType=ke.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ee("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ee("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ee("Approval",a)}))}};var Ds=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ee("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ee("LogSetOwner",a)}))}};var Os=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ee("Approval",i)}))}};var u6=async(n,e)=>{let t=await up(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Ds(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Os(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new ue(e,gp,t)}};Oi.abi=gp;var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new Y.Interface(Tp)}static connect(e,t){return new ue(e,Tp,t)}};Bi.abi=Tp;var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new Y.Interface(vp)}static connect(e,t){return new ue(e,vp,t)}};Fi.abi=vp;var{AddressZero:wp}=ht;var Nu=P.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===wp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=P.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return Y.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ee("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await ks(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,wp,Cl);return[e,t,wp,Cl,a,i,r,s]},async t=>({...ee("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(pt.Decision,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Decision})}approveStake(e,t=ve.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Pu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let M=await this.getMinStake(o,t);if(P.from(a).lt(M))throw new Error(`The staked amount is too small. Please stake at least ${Pl(M)}`);let{domainId:k,rootHash:v}=await this.getMotion(e),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),k,vt.Arbitration,this.address),{skillId:N}=await this.colony.getTeam(k),{key:F,value:U,branchMask:G,siblings:q}=await this.colony.reputation.getReputationWithProofs(N,r,v);return[e,C,D,P.from(t),a,F,U,G,q]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ee("MotionStaked",r),...ee("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:b,siblings:M}=await this.colony.reputation.getReputationWithProofs(o,l,s),k=await this.createMotionSalt(e),v=Y.solidityKeccak256(["bytes","uint256"],[k,t]);return[e,v,p,f,b,M]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ee("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,f,p);if(!b)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:M,value:k,branchMask:v,siblings:C}=p;return[e,f,P.from(b),M,k,v,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ee("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await gi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:b,branchMask:M,siblings:k}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,b,M,k]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ee("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ee("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.VotingReputation),t],async a=>({...ee("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ua=Bn;Ua.supportedVersions=[{version:7,factory:Oi},{version:8,factory:Bi},{version:9,factory:Fi}],Ua.extensionType=ke.VotingReputation;var r1={["motion"]:Ua,["oneTx"]:La},Rr=class{static async connect(e,t){let a=await _r(t,e.config.signerOrProvider),i=Rr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await u6(e,s),l=new Rr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Rr.supportedVersions[Rr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ea(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ua.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await La.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Colony,e),[t]},async t=>({...ee("ColonyMetadata",t)}),{metadataType:pt.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:pt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ve.RootDomain],{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainMetadata",t)}),{metadataType:pt.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ee("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ee("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ve.RootDomain,s=a||ve.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${P.from(t).toString()} does not exist`);let[p,f]=await Zn(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),M=await gi(b,this.colony,r,s),k=await gi(b,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:C}=await this.colony.getDomain(t);return[p,f,r,M,k,v,C,e,o]},async l=>({...ee("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ve.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ve.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ee("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(pt.Annotation,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Annotation})}installExtension(e){let t=r1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ti(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Pu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ve.RootDomain){let a=await this.colony.getUserRoles(e,t);return Xo(a)}setRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ee("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ee("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ee("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ee("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ee("ColonyUpgraded",a)}))}awardReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ee("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,P.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ee("ArbitraryReputationUpdate",i)}))}},Bs=Rr;Bs.supportedVersions=[{version:11,factory:Ii},{version:12,factory:Si},{version:13,factory:Ri}];var{splitSignature:sR}=Y;var{namehash:AR}=Y,{AddressZero:ER}=ht;var u1=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0xa4b1",chainName:"Arbitrum One via Colony",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:[_s.ArbitrumOne],blockExplorerUrls:["https://arbiscan.io/"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",u1);})(); +`)}static register(e,t){if(t||(t=e.locale),ux)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||R(a._ethers.wordlists,t,e))}catch{}}};var dx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",Xr=null;function G0(n){if(Xr==null&&(Xr=dx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Xr=null,new Error("BIP39 Wordlist for en (English) FAILED")}var Gd=class extends hn{constructor(){super("en")}getWord(e){return G0(this),Xr[e]}getWordIndex(e){return G0(this),Xr.indexOf(e)}},zd=new Gd;hn.register(zd);var ci={en:zd};var z0="hdnode/5.7.0";var Yr=new A(z0),lx=P.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),px=ge("Bitcoin seed"),lr=2147483648;function W0(n){return(1<=256)throw new Error("Depth too large!");return K0(de([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",j(this.depth),this.parentFingerprint,fe(j(this.index),4),this.chainCode,this.privateKey!=null?de(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(dr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~lr));let a=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(B(this.privateKey),1),t&&(t+="'")}else a.set(B(this.publicKey));for(let b=24;b>=0;b-=8)a[33+(b>>3)]=e>>24-b&255;let i=B(pa($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Mo(P.from(r).add(this.privateKey).mod(lx)):l=new cn(j(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(dr,o,l,this.fingerprint,Mo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=lr)throw new Error("invalid path index - "+r);a=a._derive(lr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=lr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=B(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=B(pa($n.sha512,px,a));return new Ct(dr,Mo(i.slice(0,32)),null,"0x00000000",Mo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Kd(a),e=mi(pr(e,a),a),Ct._fromSeed(Wd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=la.decode(e);(t.length!==82||K0(t.slice(0,78))!==e)&&Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=j(t.slice(5,9)),r=parseInt(j(t.slice(9,13)).substring(2),16),s=j(t.slice(13,45)),o=t.slice(45,78);switch(j(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(dr,null,j(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(dr,j(o.slice(1)),null,i,s,r,a,null)}return Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Wd(n,e){e||(e="");let t=ge("mnemonic"+e,qt.NFKD);return fi(ge(n,qt.NFKD),t,2048,64,"sha512")}function pr(n,e){e=Kd(e),Yr.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=B(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=W0(s);if((B(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return j(a.slice(0,r/8))}function mi(n,e){if(e=Kd(e),n=B(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&yx(8-a)),a+=3);let i=n.length/4,r=B(Xt(n))[0]&W0(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function J0(n,e){try{return pr(n,e),!0}catch{}return!1}function $0(n){return(typeof n!="number"||n<0||n>=lr||n%1)&&Yr.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Q0="random/5.7.0";var Jd=new A(Q0);function fx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var X0=fx(),Co=X0.crypto||X0.msCrypto;(!Co||!Co.getRandomValues)&&(Jd.warn("WARNING: Missing strong random number source"),Co={getRandomValues:function(n){return Jd.throwError("no secure random source avaialble",A.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Jd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Co.getRandomValues(e),B(e)}function Zr(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var Xd=wn(Qd());var Io="json-wallets/5.7.0";function fa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),B(n)}function yr(n,e){for(n=String(n);n.length{D=B(D);let N=D.slice(0,16),F=D.slice(16,32),U=D.slice(32,64),G=new ca.default.Counter(b),q=new ca.default.ModeOfOperation.ctr(N,G),K=B(q.encrypt(i)),ye=le(de([F,K])),te={address:n.address.substring(2).toLowerCase(),id:Z0(M),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:j(b).substring(2)},ciphertext:j(K).substring(2),kdf:"scrypt",kdfparams:{salt:j(f).substring(2),n:k,dklen:32,p:C,r:v},mac:ye.substring(2)}};if(s){let ae=Qn(16),Re=new ca.default.Counter(ae),ie=new ca.default.ModeOfOperation.ctr(U,Re),we=B(ie.encrypt(s)),E=new Date,u=E.getUTCFullYear()+"-"+yr(E.getUTCMonth()+1,2)+"-"+yr(E.getUTCDate(),2)+"T"+yr(E.getUTCHours(),2)+"-"+yr(E.getUTCMinutes(),2)+"-"+yr(E.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:j(ae).substring(2),mnemonicCiphertext:j(we).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(te)})}function df(n,e,t){if(So(n)){t&&t(0);let a=Zd(n,e);return t&&t(1),Promise.resolve(a)}return Ro(n)?uf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function lf(n,e){if(So(n))return Zd(n,e);if(Ro(n))return of(n,e);throw new Error("invalid JSON wallet")}var pf="wallet/5.7.0";var yf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fr=new A(pf);function bx(n){return n!=null&&Z(n.privateKey,32)&&n.address!=null}function gx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),bx(e)){let a=new cn(e.privateKey);if(R(this,"_signingKey",()=>a),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&fr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),gx(e)){let i=e.mnemonic;R(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ya,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&fr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else R(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&fr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),R(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);R(this,"_signingKey",()=>a)}R(this,"_mnemonic",()=>null),R(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&fr.throwArgumentError("invalid provider","provider",t),R(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ce(e).then(t=>{t.from!=null&&(pe(t.from)!==this.address&&fr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(le(Jr(t)));return Jr(t,a)})}signMessage(e){return yf(this,void 0,void 0,function*(){return Pr(this._signingKey().signDigest(Qi(e)))})}_signTypedData(e,t,a){return yf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&fr.throwError("cannot resolve ENS names without a provider",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Pr(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),il(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Me(le(de([t,e.extraEntropy])),0,16)));let a=mi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return df(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(lf(e,t))}static fromMnemonic(e,t,a){return t||(t=ya),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function ff(n,e){return li(Qi(n),e)}function cf(n,e,t,a){return li(bt.hash(n,e,t),a)}var Da={};Li(Da,{AlchemyProvider:()=>gr,AlchemyWebSocketProvider:()=>ps,AnkrProvider:()=>ys,BaseProvider:()=>Yn,CloudflareProvider:()=>fs,EtherscanProvider:()=>cs,FallbackProvider:()=>hs,Formatter:()=>J,InfuraProvider:()=>vr,InfuraWebSocketProvider:()=>bs,IpcProvider:()=>xl,JsonRpcBatchProvider:()=>Wo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>xr,NodesmithProvider:()=>gs,PocketProvider:()=>Ts,Provider:()=>$t,Resolver:()=>hr,StaticJsonRpcProvider:()=>ls,UrlJsonRpcProvider:()=>It,Web3Provider:()=>vs,WebSocketProvider:()=>xa,getDefaultProvider:()=>Jo,getNetwork:()=>ts,isCommunityResourcable:()=>ol,isCommunityResource:()=>is,showThrottleMessage:()=>Xn});var mf="networks/5.7.1";var hf=new A(mf);function Tx(n){return n&&typeof n.renetwork=="function"}function ma(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ma(t)},e}function Do(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Do(n,a)},t}var xf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ma("homestead")},bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ma("ropsten")},gf={chainId:63,name:"classicMordor",_defaultProvider:Do("https://www.ethercluster.com/mordor","classicMordor")},No={unspecified:{chainId:0,name:"unspecified"},homestead:xf,mainnet:xf,morden:{chainId:2,name:"morden"},ropsten:bf,testnet:bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ma("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ma("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ma("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ma("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Do("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:gf,classicTestnet:gf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Do("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ma("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ma("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ts(n){if(n==null)return null;if(typeof n=="number"){for(let a in No){let i=No[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=No[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=No[n.name];if(!e)return typeof n.chainId!="number"&&hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Tx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Tf="web/5.7.1";var vx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function vf(n,e){return vx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:B(new Uint8Array(i))}})}var wx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new A(Tf);function wf(n){return new Promise(e=>{setTimeout(e,n)})}function Pa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ta(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return j(n)}return n}function _x(n){return ge(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function rl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,b=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(b=n.timeout),n.headers)for(let N in n.headers)o[N.toLowerCase()]={key:N,value:String(n.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",A.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let N=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+$i(ge(N))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=Te(n.fetchOptions))}let M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),k=l?l.match(M):null;if(k)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":k[1]||"text/plain"},body:k[2]?Ji(k[3]):_x(k[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){In.throwError("processing response error",A.errors.SERVER_ERROR,{body:Pa(k[1],k[2]),error:N,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(N=>{let F=o[N];v[F.key]=F.value}),p.headers=v;let C=function(){let N=null;return{promise:new Promise(function(G,q){b&&(N=setTimeout(()=>{N!=null&&(N=null,q(In.makeError("timeout",A.errors.TIMEOUT,{requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,timeout:b,url:l})))},b))}),cancel:function(){N!=null&&(clearTimeout(N),N=null)}}}(),D=function(){return wx(this,void 0,void 0,function*(){for(let N=0;N=300)&&(C.cancel(),In.throwError("bad response",A.errors.SERVER_ERROR,{status:F.statusCode,headers:F.headers,body:Pa(U,F.headers?F.headers["content-type"]:null),requestBody:Pa(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let G=yield t(U,F);return C.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",A.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ge(e);let r=typeof n=="string"?{url:n}:Te(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=Te(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return rl(n,i,a)}function Rn(n,e){return e||(e={}),e=Te(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));be.ceiling&&(b=e.ceiling),setTimeout(p,b)}return null},function(f){s()&&a(f)})}p()})}var pl=wn(Ef());var _e="providers/5.7.2";var as=new A(_e),J=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=b=>this.data(b,!0);return e.transaction={hash:s,type:p,accessList:J.allowNull(this.accessList.bind(this),null),blockHash:J.allowNull(s,null),blockNumber:J.allowNull(l,null),transactionIndex:J.allowNull(l,null),confirmations:J.allowNull(l,null),from:t,gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),gasLimit:a,to:J.allowNull(t,null),value:a,nonce:l,data:r,r:J.allowNull(this.uint256),s:J.allowNull(this.uint256),v:J.allowNull(l),creates:J.allowNull(t,null),raw:J.allowNull(r)},e.transactionRequest={from:J.allowNull(t),nonce:J.allowNull(l),gasLimit:J.allowNull(a),gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),to:J.allowNull(t),value:J.allowNull(a),data:J.allowNull(f),type:J.allowNull(l),accessList:J.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:J.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:J.allowNull(this.address,null),from:J.allowNull(this.address,null),contractAddress:J.allowNull(t,null),transactionIndex:l,root:J.allowNull(o),gasUsed:a,logsBloom:J.allowNull(r),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:J.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:J.allowNull(a),status:J.allowNull(l),type:p},e.block={hash:J.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:J.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:J.allowNull(t),extraData:r,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(a)},e.blockWithTransactions=Te(e.block),e.blockWithTransactions.transactions=J.allowNull(J.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:J.allowNull(i,void 0),toBlock:J.allowNull(i,void 0),blockHash:J.allowNull(s,void 0),address:J.allowNull(t,void 0),topics:J.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:J.allowNull(l),blockHash:J.allowNull(s),transactionIndex:l,removed:J.allowNull(this.boolean.bind(this)),address:t,data:J.allowFalsish(r,"0x"),topics:J.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:P.from(e).toNumber()}type(e){return e==="0x"||e==null?0:P.from(e).toNumber()}bigNumber(e){return P.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),Z(e))?e.toLowerCase():as.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Me(e,12));return t===Ys?null:t}contractAddress(e){return si(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Z(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Pt(a)!==32?as.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=P.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!Z(e))throw new Error("invalid uint256");return fe(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=J.check(t,e);return i._difficulty=a==null?null:P.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return J.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&P.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=J.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;Z(a)&&(a=P.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),Z(a)&&(a=P.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return vo(e)}receiptLog(e){return J.check(this.formats.receiptLog,e)}receipt(e){let t=J.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=P.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&as.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):as.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&as.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return J.check(this.formats.filter,e)}filterLog(e){return J.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function ol(n){return n&&typeof n.isCommunityResource=="function"}function is(n){return ol(n)&&n.isCommunityResource()}var Mf=!1;function Xn(){Mf||(Mf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var re=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ce=new A(_e),Rx=10;function Cf(n){return n==null?"null":(Pt(n)!==32&&ce.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function If(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Cf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Cf(e)}).join("&")}function Px(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function mr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+If(n);if(lo.isForkEvent(n))throw ce.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+If(n.topics||[])}throw new Error("invalid event - "+n)}function rs(){return new Date().getTime()}function Sf(n){return new Promise(e=>{setTimeout(e,n)})}var Nx=["block","network","pending","poll"],yl=class{constructor(e,t,a){R(this,"tag",e),R(this,"listener",t),R(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=Px(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Nx.indexOf(this.tag)>=0}},Dx={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ul(n){return fe(P.from(n).toHexString(),32)}function Rf(n){return la.encode(de([n,Me(Xt(Xt(n)),0,4)]))}var Df=new RegExp("^(ipfs)://(.*)$","i"),Pf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Df,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lo(n,e){try{return Jt(ss(n,e))}catch{}return null}function ss(n,e){if(n==="0x")return null;let t=P.from(Me(n,e,e+32)).toNumber(),a=P.from(Me(n,t,t+32)).toNumber();return Me(n,t+32,t+32+a)}function dl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):ce.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Nf(n){let e=B(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Ox(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Of(n){let e=[],t=0;for(let a=0;aP.from(e).eq(1)).catch(e=>{if(e.code===A.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return re(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Of([Gr(this.name),a.data])]));try{let r=yield this.provider.call(a);return B(r).length%32===4&&ce.throwError("resolver threw error",A.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ss(r,0)),r}catch(r){if(r.code===A.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return re(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ss(a,0):null})}_getAddress(e,t){let a=Dx[String(e)];if(a==null&&ce.throwError(`unsupported coin type: ${e}`,A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=B(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Rf(de([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Rf(de([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=pl.default.toWords(i.slice(2));return o.unshift(s),pl.default.encode(a.prefix,o)}}return null}getAddress(e){return re(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Ki?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===A.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",ul(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&ce.throwError("invalid or unsupported coin data",A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return re(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return ce.throwError("invalid or unsupported content hash data",A.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return re(this,void 0,void 0,function*(){let t=ge(e);t=de([ul(64),ul(t.length),t]),t.length%32!==0&&(t=de([t,fe("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",j(t));return a==null||a==="0x"?null:Jt(a)})}},ll=null,Bx=1,Yn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),R(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(R(this,"_network",t),this.emit("network",t,null)):ce.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return re(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ce.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:R(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===A.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ll==null&&(ll=new J),ll}static getNetwork(e){return ts(e??"homestead")}ccipReadFetch(e,t,a){return re(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),b=yield Sn({url:p,errorPassThrough:!0},f,(k,v)=>(k.status=v.statusCode,k));if(b.data)return b.data;let M=b.message||"unknown error";if(b.status>=400&&b.status<500)return ce.throwError(`response not found during CCIP fetch: ${M}`,A.errors.SERVER_ERROR,{url:l,errorMessage:M});s.push(M)}return ce.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,A.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return re(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(rs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=rs(),a=Ce({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=rs();return i=P.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return re(this,void 0,void 0,function*(){let e=Bx++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",ce.makeError("network block skew detected",A.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return re(this,void 0,void 0,function*(){return ce.throwError("provider does not support network detection",A.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return re(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Sf(0),this._network;let a=ce.makeError("underlying network changed",A.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=rs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return re(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return re(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(M=>{M()}),!1)},b=M=>{M.confirmations{this.removeListener(e,b)}),i){let M=i.startBlock,k=null,v=C=>re(this,void 0,void 0,function*(){p||(yield Sf(1e3),this.getTransactionCount(i.from).then(D=>re(this,void 0,void 0,function*(){if(!p){if(D<=i.nonce)M=C;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(k==null&&(k=M-3,k{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let M=setTimeout(()=>{f()||o(ce.makeError("timeout exceeded",A.errors.TIMEOUT,{timeout:a}))},a);M.unref&&M.unref(),l.push(()=>{clearTimeout(M)})}})})}getBlockNumber(){return re(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return re(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return P.from(e)}catch(t){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return P.from(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return P.from(i).toNumber()}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return j(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return re(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return j(r)}catch(s){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Pt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&ce.throwError("Transaction hash mismatch from Provider.sendTransaction.",A.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>re(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&ce.throwError("transaction failed",A.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>j(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return re(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?P.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?j(r):null))}),this.formatter.transactionRequest(yield Ce(a))})}_getFilter(e){return re(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ce(t))})}_call(e,t,a){return re(this,void 0,void 0,function*(){a>=Rx&&ce.throwError("CCIP read exceeded maximum redirections",A.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Pt(r)%32===4)try{let s=Me(r,4),o=Me(s,0,32);P.from(o).eq(i)||ce.throwError("CCIP Read sender did not match",A.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=P.from(Me(s,32,64)).toNumber(),f=P.from(Me(s,p,p+32)).toNumber(),b=Me(s,p+32);for(let N=0;Nre(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return re(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return re(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ce.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return re(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new hr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return re(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||ce.throwError("network does not support ENS",A.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return re(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(Z(e))throw a}typeof e!="string"&&ce.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return re(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Lo(yield this.call({to:a,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return re(this,void 0,void 0,function*(){let t=null;if(Z(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new hr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o}try{let o=Lo(yield this.call({to:s,data:"0x691f3431"+Ea(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==A.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return ce.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new yl(mr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=mr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=mr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=mr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=mr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=mr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ha=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new A(_e),Fx=["call","estimateGas"];function us(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=Z(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=us(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return us(JSON.parse(n),e)}catch{}return null}function Ff(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=us(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",A.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=us(e.body,!1);r==null&&(r=us(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===A.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",A.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),Fx.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Bf(n){return new Promise(function(e){setTimeout(e,n)})}function Lx(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function os(n){return n&&n.toLowerCase()}var fl={},xr=class extends Gt{constructor(e,t,a){if(super(),e!==fl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),a==null&&(a=0),typeof a=="string"?(R(this,"_address",this.provider.formatter.address(a)),R(this,"_index",null)):typeof a=="number"?(R(this,"_index",a),R(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",A.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new cl(fl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,A.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Te(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=Te(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ha(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",A.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Ff("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ha(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ha(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[j(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),j(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ha(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ha(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},cl=class extends xr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},Ux={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Yn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?R(this,"connection",Object.freeze({url:e})):R(this,"connection",Object.freeze(Te(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ha(this,void 0,void 0,function*(){yield Bf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(P.from(e).toNumber())}catch(a){return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new xr(fl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),Lx).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[os(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[os(t.address),t.blockTag]];case"getCode":return["eth_getCode",[os(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[os(t.address),fe(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=os(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ha(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&P.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=Te(t),t.transaction=Te(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",A.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return Ff(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return Bf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=Te(Ux);if(t)for(let r in t)t[r]&&(a[r]=!0);ji(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Fn(P.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=j(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var br=null;try{if(br=WebSocket,br==null)throw new Error("inject please")}catch{let e=new A(_e);br=function(){e.throwError("WebSockets not supported in this environment",A.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var ml=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uo=new A(_e),Vx=1,xa=class extends Yt{constructor(e,t){t==="any"&&Uo.throwError("WebSocketProvider does not support 'any' network yet",A.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?R(this,"_websocket",new br(this.connection.url)):R(this,"_websocket",e),R(this,"_requests",{}),R(this,"_subs",{}),R(this,"_subIds",{}),R(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),R(p,"code",s.error.code||null),R(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Uo.throwError("cannot reset events block on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Uo.throwError("cannot set polling interval on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Uo.throwError("cannot set polling on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=Vx++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return ml(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=P.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return ml(this,void 0,void 0,function*(){this.websocket.readyState===br.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var jx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ds=new A(_e),ls=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return jx(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ds.throwError("no network detected",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ls{constructor(e,t){ds.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{R(this,i,t[i])})}_startPending(){ds.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ds.throwError("API provider does not support signing",A.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ds.throwError("not implemented; sub-classes must override getUrl",A.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Lf=new A(_e),Vo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ps=class extends xa{constructor(e,t){let a=new gr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),R(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Vo}},gr=class extends It{static getWebSocketProvider(e,t){return new ps(e,t)}static getApiKey(e){return e==null?Vo:(e&&typeof e!="string"&&Lf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:Lf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Vo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Vo}};var Hx=new A(_e),jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function qx(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Hx.throwArgumentError("unsupported network","name",n)}var ys=class extends It{isCommunityResource(){return this.apiKey===jo}static getApiKey(e){return e??jo}static getUrl(e,t){t==null&&(t=jo);let a={allowGzip:!0,url:"https://"+qx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var Gx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uf=new A(_e),fs=class extends It{static getApiKey(e){return e!=null&&Uf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:Uf.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Gx(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var Ho=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Na=new A(_e);function Vf(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Fn(j(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=j(a),e[t]=a)}return e}function zx(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function jf(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function Hf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function hl(n,e,t){if(n==="call"&&e.code===A.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),Z(r))return r;Na.throwError("missing revert data in call exception",A.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===A.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Na.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Na.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Na.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Na.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var cs=class extends Yn{constructor(e,t){super(e),R(this,"baseUrl",this.getBaseUrl()),R(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Na.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return Ho(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?jf:zx;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,b)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||jf);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Ho(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Ho(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>hl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=Vf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("call",r,t.transaction)}}case"estimateGas":{let i=Vf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=Hf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Hf(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Na.throwError("unsupported topic count",A.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Na.throwError("unsupported topic format",A.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var zo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hi=new A(_e);function qo(){return new Date().getTime()}function qf(n){let e=null;for(let t=0;te?null:(a+i)/2}function Tr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(P.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Tr(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Tr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var Kx=1;function zf(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var Wx=[A.errors.CALL_EXCEPTION,A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED,A.errors.UNPREDICTABLE_GAS_LIMIT],Jx=["address","args","errorArgs","errorSignature","method","transaction"];function Go(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function $x(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function Qx(n,e,t){let a=Tr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Gf(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return Gf(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=Te(i),i.confirmations=-1,Tr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=Te(i),i.transactions=i.transactions.map(r=>(r=Te(r),r.confirmations=-1,r)),Tr(i))}:a=function(i){return i==null?null:Tr(i)};break;default:throw new Error("unknown method: "+e)}return $x(a,n.quorum)}function ms(n,e){return zo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function Xx(n,e,t,a){return zo(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&Z(r.fromBlock)||r.toBlock&&Z(r.toBlock))&&(i=yield ms(n,e)),i.getLogs(r)}}return hi.throwError("unknown method error",A.errors.UNKNOWN_ERROR,{method:t,params:a})})}var hs=class extends Yn{constructor(e,t){e.length===0&&hi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=is(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=Te(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=is(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&hi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&hi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=qf(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),R(this,"providerConfigs",Object.freeze(a)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return zo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return qf(e)})}perform(e,t){return zo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=qo(),p=i.filter(k=>k.runner&&l-k.startk+v.weight,0);for(;p{k.staller=null}),k.runner=Xx(k,r,e,t).then(C=>{k.done=!0,k.result=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})},C=>{k.done=!0,k.error=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,null),request:{method:e,params:ct(t)},provider:this}),p+=k.weight}let f=[];i.forEach(k=>{k.done||!k.runner||(f.push(k.runner),k.staller&&f.push(k.staller.getPromise()))}),f.length&&(yield Promise.race(f));let b=i.filter(k=>k.done&&k.error==null);if(b.length>=this.quorum){let k=a(b);if(k!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),k;o||(yield zf(100).getPromise()),o=!1}let M=i.reduce((k,v)=>{if(!v.done||v.error==null)return k;let C=v.error.code;return Wx.indexOf(C)>=0&&(k[C]||(k[C]={error:v.error,weight:0}),k[C].weight+=v.weight),k},{});if(Object.keys(M).forEach(k=>{let v=M[k];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let C=v.error,D={};Jx.forEach(N=>{C[N]!=null&&(D[N]=C[N])}),hi.throwError(C.reason||C.message,k,D)}),i.filter(k=>!k.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),hi.throwError("failed to meet quorum",A.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Go(l)),provider:this})})}};var xl=null;var Ko=new A(_e),xs="84842078b09946638c03157f83405213",bs=class extends xa{constructor(e,t){let a=new vr(e,t),i=a.connection;i.password&&Ko.throwError("INFURA WebSocket project secrets unsupported",A.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),R(this,"apiKey",a.projectId),R(this,"projectId",a.projectId),R(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===xs}},vr=class extends It{static getWebSocketProvider(e,t){return new bs(e,t)}static getApiKey(e){let t={apiKey:xs,projectId:xs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Ko.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Ko.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Ko.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===xs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===xs}};var Wo=class extends Yt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let b=l[f];if(b.error){let M=new Error(b.error.message);M.code=b.error.code,M.data=b.error.data,p.reject(M)}else p.resolve(b.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var bl=new A(_e),Yx="ETHERS_JS_SHARED",gs=class extends It{static getApiKey(e){return e&&typeof e!="string"&&bl.throwArgumentError("invalid apiKey","apiKey",e),e||Yx}static getUrl(e,t){bl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var Kf=new A(_e),Wf="62e1ad51b37b8e00394bda3b",Ts=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Wf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Kf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:Kf.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===Wf}};var Jf=new A(_e),Zx=1;function $f(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:Zx++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function e5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var vs=class extends Yt{constructor(e,t){e==null&&Jf.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=e5(e)):e.sendAsync?i=$f(e,e.sendAsync.bind(e)):e.send?i=$f(e,e.send.bind(e)):Jf.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),R(this,"jsonRpcFetchFunc",i),R(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Qf=new A(_e);function Jo(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Yt(n);case"ws":case"wss":return new xa(n);default:Qf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ts(n);return(!t||!t._defaultProvider)&&Qf.throwError("unsupported getDefaultProvider network",A.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:hs,AlchemyProvider:gr,AnkrProvider:ys,CloudflareProvider:fs,EtherscanProvider:cs,InfuraProvider:vr,JsonRpcProvider:Yt,NodesmithProvider:gs,PocketProvider:Ts,Web3Provider:vs,IpcProvider:null},e)}var Y={};Li(Y,{AbiCoder:()=>Wi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>xe,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>ra,Interface:()=>Ma,LogDescription:()=>Xi,Logger:()=>A,ParamType:()=>lt,RLP:()=>Gs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yi,TransactionTypes:()=>To,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>ao,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>rl,_toEscapedUtf8String:()=>ld,accessListify:()=>sn,arrayify:()=>B,base58:()=>la,base64:()=>hd,checkProperties:()=>ji,checkResultErrors:()=>qi,commify:()=>ic,computeAddress:()=>mn,computeHmac:()=>pa,computePublicKey:()=>Wr,concat:()=>de,deepCopy:()=>ct,defaultAbiCoder:()=>Hr,defaultPath:()=>ya,defineReadOnly:()=>R,dnsEncode:()=>Gr,entropyToMnemonic:()=>mi,fetchJson:()=>Sn,formatBytes32String:()=>pd,formatEther:()=>rc,formatUnits:()=>gl,getAccountPath:()=>$0,getAddress:()=>pe,getContractAddress:()=>si,getCreate2Address:()=>dy,getIcapAddress:()=>uy,getJsonWalletAddress:()=>el,getStatic:()=>mt,hashMessage:()=>Qi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Me,hexStripZeros:()=>Zu,hexValue:()=>Fn,hexZeroPad:()=>fe,hexlify:()=>j,id:()=>nn,isAddress:()=>oy,isBytes:()=>on,isBytesLike:()=>ta,isHexString:()=>Z,isValidMnemonic:()=>J0,isValidName:()=>bd,joinSignature:()=>Pr,keccak256:()=>le,mnemonicToEntropy:()=>pr,mnemonicToSeed:()=>Wd,namehash:()=>Ea,nameprep:()=>md,parseBytes32String:()=>yd,parseEther:()=>sc,parseTransaction:()=>vo,parseUnits:()=>Tl,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>li,recoverPublicKey:()=>go,resolveProperties:()=>Ce,ripemd160:()=>Qr,serializeTransaction:()=>Jr,sha256:()=>Xt,sha512:()=>qd,shallowCopy:()=>Te,shuffled:()=>Zr,solidityKeccak256:()=>Zf,solidityPack:()=>$o,soliditySha256:()=>ec,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ge,toUtf8CodePoints:()=>Aa,toUtf8String:()=>Jt,verifyMessage:()=>ff,verifyTypedData:()=>cf,zeroPad:()=>ni});var Xf="solidity/5.7.0";var t5=new RegExp("^bytes([0-9]+)$"),n5=new RegExp("^(u?int)([0-9]*)$"),a5=new RegExp("^(.*)\\[([0-9]*)\\]$"),i5="0000000000000000000000000000000000000000000000000000000000000000",wr=new A(Xf);function Yf(n,e,t){switch(n){case"address":return t?ni(e,32):B(e);case"string":return ge(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ni(e,32):B(e)}let a=n.match(n5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&wr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=P.from(e).toTwos(i),ni(e,i/8)}if(a=n.match(t5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&wr.throwArgumentError("invalid bytes type","type",n),B(e).byteLength!==i&&wr.throwArgumentError(`invalid value for ${n}`,"value",e),t?B((e+i5).substring(0,66)):e}if(a=n.match(a5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&wr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Yf(i,o,!0))}),de(s)}return wr.throwArgumentError("invalid type","type",n)}function $o(n,e){n.length!=e.length&&wr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Yf(a,e[i]))}),j(de(t))}function Zf(n,e){return le($o(n,e))}function ec(n,e){return Xt($o(n,e))}var tc="units/5.7.0";var nc=new A(tc),ac=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ic(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&nc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function gl(n,e){if(typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return Vi(n,e??18)}function Tl(n,e){if(typeof n!="string"&&nc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function rc(n){return gl(n,18)}function sc(n){return Tl(n,18)}var Qo="ethers/5.7.2";var oc=new A(Qo);try{let n=window;n._ethers==null&&(n._ethers=vl)}catch{}var ba;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ba||(ba={}));var uc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(uc||(uc={}));var wl;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(wl||(wl={}));var ws;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(ws||(ws={}));var _l;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(_l||(_l={}));var _s;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(_s||(_s={}));var kl;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(kl||(kl={}));var Al;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Al||(Al={}));var El;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(El||(El={}));var ve;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ve||(ve={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Cl="0x12345678",Ml;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Ml||(Ml={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var ke;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(ke||(ke={}));var Il=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],xi=class{static createInterface(){return new Y.Interface(Il)}static connect(e,t){return new ue(e,Il,t)}};me(xi,"abi",Il);var Sl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],bi=class{static createInterface(){return new Y.Interface(Sl)}static connect(e,t){return new ue(e,Sl,t)}};me(bi,"abi",Sl);var dc=(n,e)=>{throw new Error(`${e}: ${n}`)},Rl=n=>n!=null;var{keccak256:s5,toUtf8Bytes:o5}=Y,{MaxUint256:u5}=ht;var Pl=n=>Y.formatEther(n);var Nl=n=>{let e=n.reduce((t,a)=>t|1<{let e=P.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Rl)},gi=async(n,e,t,a)=>{if(P.from(t).eq(P.from(a)))return u5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return P.from(o)},Oa=n=>s5(o5(n));var _r=async(n,e)=>(await bi.connect(n,e).version()).toNumber(),Dl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Rl);var{hexDataSlice:Ol}=Y,{MaxUint256:d5}=ht,lc=n=>{let e=Ol(n,0,3),t=P.from(Ol(n,4,35)),a=P.from(Ol(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},pc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[P.from(t),d5,r];let o=P.from(ve.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await gi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},l5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>pc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?Zn(n,e,t,a[0],i):l5(n,e,t,a,i):pc(n,e,t,a,i);var{MaxUint256:yc}=ht,{AddressZero:p5}=ht;async function y5(n,e){let t;try{return t=await n.getCapabilityRoles(Y.hexZeroPad(e,4)),Xo(t)}catch{return[]}}async function ks(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:b}=lc(s),M=xi.connect(r,a.signer||a.provider),k=await y5(M,p);if(k.includes(vt.Root)||k.length===0){if(!P.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ve.RootDomain}`);o=yc}else{let{skillId:F}=await e.getDomain(f),U=await n.getChildSkillId(F,b);if(U.eq(l))o=yc;else{let{children:G}=await n.getSkill(l),q=G.findIndex(K=>K.eq(U));if(q<0)throw new Error(`Could not find ${U} as a child of ${l}`);o=P.from(q)}}let{key:v,value:C,branchMask:D,siblings:N}=await t.getReputationWithProofs(l,p5);return{actionCid:o,key:v,value:C,branchMask:D,siblings:N}}var{AddressZero:f5}=ht,ea=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||ba.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||ws[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(P.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=P.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=P.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await ea.fetchReputation(s);return{...o,reputationAmount:P.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await ea.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,b=await this.colony.getDomain(f);return{domainId:f,skillId:b.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:b})=>b===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?P.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}`;return ea.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}/${f5}/noProof`,s=await ea.fetchReputation(r);return{...s,reputationAmount:P.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(P.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var fc=10,G7=Et(fc),cc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},mc=fc-1;var hc=3,W7=Et(hc),xc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},bc=hc-1;var gc=10,Q7=Et(gc),Tc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},vc=gc-1;var wc=7,Z7=Et(wc),_c={1:[],2:[],3:[],4:[],5:[],6:[]},kc=wc-1;var Ac=8,nk=Et(Ac),Ec={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Mc=Ac-1;var Cc=5,rk=Et(Cc),Ic={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Sc=Cc-1;var Rc=7,uk=Et(Rc),Pc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Nc=Rc-1;var Dc=10,pk=Et(Dc),Oc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Bc=Dc-1;var Fc=14,ck=Et(Fc),Bl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Fl=Fc-1;var Lc=18,c5=Et(Lc),xk=Lc-1;var m5=(n,e)=>{switch(n){case ke.FundingQueue:return cc[e];case ke.IVotingReputation:return Bl[e];case ke.MultisigPermissions:return xc[e];case ke.OneTxPayment:return Tc[e];case ke.ReputationBootstrapper:return _c[e];case ke.StagedExpenditure:return Ic[e];case ke.StakedExpenditure:return Ec[e];case ke.StreamingPayments:return Pc[e];case ke.TokenSupplier:return Oc[e];case ke.VotingReputation:return Bl[e];default:return dc(n,"Could not find extension with name")}},Ti=(n,e,t)=>{let a=m5(n,e);return!!a&&!a.includes(t)};var h5={[ke.FundingQueue]:mc,[ke.IVotingReputation]:Fl,[ke.MultisigPermissions]:bc,[ke.OneTxPayment]:vc,[ke.ReputationBootstrapper]:kc,[ke.StagedExpenditure]:Sc,[ke.StakedExpenditure]:Mc,[ke.StreamingPayments]:Nc,[ke.TokenSupplier]:Bc,[ke.VotingReputation]:Fl};var i6=wn(Uc(),1);var Ib=wn(a6(),1);var pt;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(pt||(pt={}));var ap;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(ap||(ap={}));var qA=(0,i6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),ip={[pt.Annotation]:"Annotation(address,bytes32,string)",[pt.Colony]:"ColonyMetadata(address,string)",[pt.Decision]:"Annotation(address,bytes32,string)",[pt.Domain]:"DomainMetadata(address,uint256,string)",[pt.Misc]:"",[pt.DEFAULT]:""};var zA=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var rp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new Y.Interface(rp)}static connect(e,t){return new ue(e,rp,t)}};me(Tn,"abi",rp);var sp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new Y.Interface(sp)}static connect(e,t){return new ue(e,sp,t)}};me(vn,"abi",sp);var op=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ei=class{static createInterface(){return new Y.Interface(op)}static connect(e,t){return new ue(e,op,t)}};me(Ei,"abi",op);var Ru=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],s6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",Db=n=>n.length>1,Pn=class extends yi{constructor(...e){Db(e)?super(...e):super(Ru,s6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Y.Interface(Ru)}static connect(e,t){return new ue(e,Ru,t)}};me(Pn,"bytecode",s6),me(Pn,"abi",Ru);var Cr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Cr||(Cr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:Lb}=ht;async function Ub(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Vb=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await Ub(t)}catch{a=!1}try{await t.nonces(Lb)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Cr.TokenClient,t},up=Vb;var{AddressZero:dp}=ht,Hb=Tn.connect(dp,new Da.BaseProvider(3656691)).interface,qb=Ei.connect(dp,new Da.BaseProvider(3656691)).interface,Gb=vn.connect(dp,new Da.BaseProvider(3656691)).interface;var lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ps=class{static createInterface(){return new Y.Interface(lp)}static connect(e,t){return new ue(e,lp,t)}};Ps.abi=lp;var pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ns=class{static createInterface(){return new Y.Interface(pp)}static connect(e,t){return new ue(e,pp,t)}};Ns.abi=pp;var yp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new ue(e,yp,t)}};Ir.abi=yp;var Mi=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,ip[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Dl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Kb,solidityKeccak256:Wb,splitSignature:Jb}=Y,Ci=class extends Mi{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ba.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=Wb(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=Kb(l),f=await a.signMessage(p),{r:b,s:M,v:k}=Jb(f),v={target:t,payload:e,userAddress:s,r:b,s:M,v:k};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ee=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Pu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=ve.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ii=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new ue(e,fp,t)}};Ii.abi=fp;var cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Si=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new ue(e,cp,t)}};Si.abi=cp;var mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ri=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new ue(e,mp,t)}};Ri.abi=mp;var hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new Y.Interface(hp)}static connect(e,t){return new ue(e,hp,t)}};Pi.abi=hp;var xp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new Y.Interface(xp)}static connect(e,t){return new ue(e,xp,t)}};Ni.abi=xp;var bp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new Y.Interface(bp)}static connect(e,t){return new ue(e,bp,t)}};Di.abi=bp;var{AddressZero:t1}=ht,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===t1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||ve.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((k,v)=>r[k].localeCompare(r[v]));let f=p.map(k=>r[k]),b=p.map(k=>l[k]),M=p.map(k=>o[k]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[k,v]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[k,v,C,D,f,M,b,s,ve.SkillIgnore]},async k=>({...ee("OneTxPaymentMade",k)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.OneTxPayment),t],async a=>({...ee("ExtensionUpgraded",a)}))}},La=Dn;La.supportedVersions=[{version:3,factory:Pi},{version:4,factory:Ni},{version:5,factory:Di}],La.extensionType=ke.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ee("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ee("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ee("Approval",a)}))}};var Ds=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ee("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ee("LogSetOwner",a)}))}};var Os=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ee("Approval",i)}))}};var u6=async(n,e)=>{let t=await up(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Ds(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Os(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new ue(e,gp,t)}};Oi.abi=gp;var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new Y.Interface(Tp)}static connect(e,t){return new ue(e,Tp,t)}};Bi.abi=Tp;var vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new Y.Interface(vp)}static connect(e,t){return new ue(e,vp,t)}};Fi.abi=vp;var{AddressZero:wp}=ht;var Nu=P.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Bn.extensionType),e.address);if(t===wp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=P.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return Y.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ee("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await ks(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,wp,Cl);return[e,t,wp,Cl,a,i,r,s]},async t=>({...ee("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(pt.Decision,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Decision})}approveStake(e,t=ve.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Pu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let M=await this.getMinStake(o,t);if(P.from(a).lt(M))throw new Error(`The staked amount is too small. Please stake at least ${Pl(M)}`);let{domainId:k,rootHash:v}=await this.getMotion(e),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),k,vt.Arbitration,this.address),{skillId:N}=await this.colony.getTeam(k),{key:F,value:U,branchMask:G,siblings:q}=await this.colony.reputation.getReputationWithProofs(N,r,v);return[e,C,D,P.from(t),a,F,U,G,q]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ee("MotionStaked",r),...ee("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:b,siblings:M}=await this.colony.reputation.getReputationWithProofs(o,l,s),k=await this.createMotionSalt(e),v=Y.solidityKeccak256(["bytes","uint256"],[k,t]);return[e,v,p,f,b,M]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ee("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),b=t||await this.getSideVoted(e,f,p);if(!b)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:M,value:k,branchMask:v,siblings:C}=p;return[e,f,P.from(b),M,k,v,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ee("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await gi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:b,branchMask:M,siblings:k}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,b,M,k]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ee("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ee("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.VotingReputation),t],async a=>({...ee("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ua=Bn;Ua.supportedVersions=[{version:7,factory:Oi},{version:8,factory:Bi},{version:9,factory:Fi}],Ua.extensionType=ke.VotingReputation;var r1={["motion"]:Ua,["oneTx"]:La},Rr=class{static async connect(e,t){let a=await _r(t,e.config.signerOrProvider),i=Rr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await u6(e,s),l=new Rr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Rr.supportedVersions[Rr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ea(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ua.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await La.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new On(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Colony,e),[t]},async t=>({...ee("ColonyMetadata",t)}),{metadataType:pt.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:pt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ve.RootDomain],{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainMetadata",t)}),{metadataType:pt.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...ee("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ee("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ve.RootDomain,s=a||ve.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${P.from(t).toString()} does not exist`);let[p,f]=await Zn(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),b=this.colonyNetwork.getInternalNetworkContract(),M=await gi(b,this.colony,r,s),k=await gi(b,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:C}=await this.colony.getDomain(t);return[p,f,r,M,k,v,C,e,o]},async l=>({...ee("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ve.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ve.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ee("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(pt.Annotation,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Annotation})}installExtension(e){let t=r1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ti(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Pu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ve.RootDomain){let a=await this.colony.getUserRoles(e,t);return Xo(a)}setRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ee("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ee("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ee("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ee("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ee("ColonyUpgraded",a)}))}awardReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ee("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,P.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ee("ArbitraryReputationUpdate",i)}))}},Bs=Rr;Bs.supportedVersions=[{version:11,factory:Ii},{version:12,factory:Si},{version:13,factory:Ri}];var{splitSignature:sR}=Y;var{namehash:AR}=Y,{AddressZero:ER}=ht;var u1=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0xa4b1",chainName:"Arbitrum One via Colony",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:[_s.ArbitrumOne],blockExplorerUrls:["https://arbiscan.io/"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",u1);})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-basic.js b/local-basic.js index 8f0851399..ac8b15a4c 100644 --- a/local-basic.js +++ b/local-basic.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Sx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Rx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function df(n){if(ts==null&&(ts=Rx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var el=class extends xn{constructor(){super("en")}getWord(e){return df(this),ts[e]}getWordIndex(e){return df(this),ts.indexOf(e)}},tl=new el;xn.register(tl);var hi={en:tl};var lf="hdnode/5.7.0";var ns=new E(lf),Px=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Nx=ve("Bitcoin seed"),fr=2147483648;function yf(n){return(1<=256)throw new Error("Depth too large!");return pf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(yr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fr));let a=new Uint8Array(37);if(e&fr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Px)):l=new mn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(yr,o,l,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,Nx,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=nl(a),e=xi(cr(e,a),a),Ct._fromSeed(al(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(yr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,W(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=nl(e),ns.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=yf(s);if((j(Yt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return W(a.slice(0,r/8))}function xi(n,e){if(e=nl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[0]&yf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function ff(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var il=new E(mf);function Ox(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var hf=Ox(),Oo=hf.crypto||hf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return il.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&il.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var ol=_n(sl());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Fo(n)){t&&t(0);let a=dl(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Ef(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Fo(n))return dl(n,e);if(Lo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&hr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&hr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&hr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Br(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Ml,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>xl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new E(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},t}var Of={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Ff={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Of,mainnet:Of,morden:{chainId:2,name:"morden"},ropsten:Bf,testnet:Bf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Lf="web/5.7.1";var qx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var Gx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ml(n,i,a)}function Rn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var vl=_n(Gf());var ke="providers/5.7.2";var os=new E(ke),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(f),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():os.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===ro?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Nt(a)!==32?os.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Co(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):os.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&os.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function xl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return xl(n)&&n.isCommunityResource()}var zf=!1;function Xn(){zf||(zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Zx=10;function Wf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[Wf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Wf(e)}).join("&")}function e5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],wl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.indexOf(this.tag)>=0}},n5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function gl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return $f(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=vl.default.toWords(i.slice(2));return o.unshift(s),vl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===$i?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",bl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([bl(64),bl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},Tl=null,i5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Tl==null&&(Tl=new X),Tl}static getNetwork(e){return rs(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=ds();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=i5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Jf(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Jf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ca(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,data:"0x691f3431"+Ca(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new gr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ca(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new wl(br(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=br(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=br(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),r5=["call","estimateGas"];function ys(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function ps(n){return n&&n.toLowerCase()}var _l={},Tr=class extends St{constructor(e,t,a){if(super(),e!==_l)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kl(_l,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},kl=class extends Tr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield ec(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(_l,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ps(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ps(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ps(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ps(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ps(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return tc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return ec(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Wo=new E(ke),u5=1,ga=class extends Xt{constructor(e,t){t==="any"&&Wo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new vr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Wo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Wo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Al(this,void 0,void 0,function*(){return null})}set polling(e){!e||Wo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=u5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Al(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Al(this,void 0,void 0,function*(){this.websocket.readyState===vr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var d5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new E(ke),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Ko}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Ko:(e&&typeof e!="string"&&nc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Ko&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var l5=new E(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var $o=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new E(ke);function ic(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Ln(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function f5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function rc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function El(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var bs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return $o(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?rc:f5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Xn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>El("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ic(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("call",r,t.transaction)}}case"estimateGas":{let i=ic(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=sc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=sc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Xo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Qo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>_r(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var m5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Yo(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function x5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function b5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=uc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return uc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return Xo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return Xo(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=us(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=us(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Xo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return oc(e)})}perform(e,t){return Xo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};h5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Yo(l)),provider:this})})}};var Ml=null;var Zo=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){let t={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var eu=class extends Xt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Cl=new E(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cl.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Cl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Cl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new E(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=pc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:lc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:lc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===pc}};var yc=new E(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var As=class extends Xt{constructor(e,t){e==null&&yc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=w5(e)):e.sendAsync?i=fc(e,e.sendAsync.bind(e)):e.send?i=fc(e,e.send.bind(e)):yc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new E(ke);function tu(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>Ys,SigningKey:()=>mn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Mo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Ed,checkProperties:()=>Gi,checkResultErrors:()=>Wi,commify:()=>wc,computeAddress:()=>hn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Wr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>vd,formatEther:()=>_c,formatUnits:()=>Il,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>un,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Cd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>al,namehash:()=>Ca,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>kc,parseTransaction:()=>Co,parseUnits:()=>Sl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Eo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>Zd,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>nu,soliditySha256:()=>bc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ii});var mc="solidity/5.7.0";var _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),E5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(mc);function hc(n,e,t){switch(n){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+E5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),W(ye(t))}function xc(n,e){return fe(nu(n,e))}function bc(n,e){return Yt(nu(n,e))}var gc="units/5.7.0";var Tc=new E(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Il(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Sl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function _c(n){return Il(n,18)}function kc(n){return Sl(n,18)}var au="ethers/5.7.2";var Ac=new E(au);try{let n=window;n._ethers==null&&(n._ethers=Rl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ec;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ec||(Ec={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Er;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Er||(Er={}));var ru;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Pl;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Pl||(Pl={}));var Es;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Es||(Es={}));var Ms;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ms||(Ms={}));var Nl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Nl||(Nl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new ne.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ne.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Mc=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},Ba=n=>C5(I5(n));var Mr=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),R5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await vi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,fk=Et(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,hk=Et(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,gk=Et(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,wk=Et(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,Ak=Et(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Wc=5,Ck=Et(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Wc-1;var $c=7,Rk=Et($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Dk=Et(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Fk=Et(tm),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Et(nm),Vk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=_n(am(),1);var yp=_n(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var w6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var lE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(vn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(wn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],A6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Vu,A6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Vu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=vn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=wn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ne.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider("http://127.0.0.1:8545"),R1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",S1),P1=async n=>{let e=R1(),i=await(await new qs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return C1(i)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},N1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{N1();let n=Up.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await P1(n),Lp(`${e} CLNY in root domain of local MetaColony`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); +`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var lE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new ne.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(vn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new ne.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(wn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],A6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Vu,A6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ne.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Vu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=vn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=wn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ne.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ne.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ne.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ne.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ne.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ne.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider("http://127.0.0.1:8545"),R1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",S1),P1=async n=>{let e=R1(),i=await(await new qs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return C1(i)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},N1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{N1();let n=Up.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await P1(n),Lp(`${e} CLNY in root domain of local MetaColony`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-motions.js b/local-motions.js index 700e86b74..8f47bd3f8 100644 --- a/local-motions.js +++ b/local-motions.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),t5)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var n5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ls=null;function vf(n){if(ls==null&&(ls=n5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),wn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ls=null,new Error("BIP39 Wordlist for en (English) FAILED")}var pl=class extends wn{constructor(){super("en")}getWord(e){return vf(this),ls[e]}getWordIndex(e){return vf(this),ls.indexOf(e)}},yl=new pl;wn.register(yl);var _i={en:yl};var wf="hdnode/5.7.0";var ps=new E(wf),a5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),i5=we("Bitcoin seed"),gr=2147483648;function kf(n){return(1<=256)throw new Error("Depth too large!");return _f(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new St(br,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~gr));let a=new Uint8Array(37);if(e&gr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(Ta(ta.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=qo(F.from(r).add(this.privateKey).mod(a5)):l=new Tn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new St(br,o,l,this.fingerprint,qo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=gr)throw new Error("invalid path index - "+r);a=a._derive(gr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=gr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(Ta(ta.sha512,i5,a));return new St(br,qo(i.slice(0,32)),null,"0x00000000",qo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=fl(a),e=ki(Tr(e,a),a),St._fromSeed(cl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return St._fromSeed(e,null)}static fromExtendedKey(e){let t=ga.decode(e);(t.length!==82||_f(t.slice(0,78))!==e)&&ps.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new St(br,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new St(br,W(o.slice(1)),null,i,s,r,a,null)}return ps.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function cl(n,e){e||(e="");let t=we("mnemonic"+e,Jt.NFKD);return wi(we(n,Jt.NFKD),t,2048,64,"sha512")}function Tr(n,e){e=fl(e),ps.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=kf(s);if((j(en(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return W(a.slice(0,r/8))}function ki(n,e){if(e=fl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&r5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&kf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Af(n,e){try{return Tr(n,e),!0}catch{}return!1}function Ef(n){return(typeof n!="number"||n<0||n>=gr||n%1)&&ps.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Mf="random/5.7.0";var ml=new E(Mf);function s5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var Cf=s5(),Go=Cf.crypto||Cf.msCrypto;(!Go||!Go.getRandomValues)&&(ml.warn("WARNING: Missing strong random number source"),Go={getRandomValues:function(n){return ml.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function na(n){(n<=0||n>1024||n%1||n!=n)&&ml.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Go.getRandomValues(e),j(e)}function ys(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var bl=Cn(xl());var zo="json-wallets/5.7.0";function wa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function vr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new _a.default.Counter(x),J=new _a.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Sf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=na(16),N=new _a.default.Counter(R),q=new _a.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+vr(C.getUTCMonth()+1,2)+"-"+vr(C.getUTCDate(),2)+"T"+vr(C.getUTCHours(),2)+"-"+vr(C.getUTCMinutes(),2)+"-"+vr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Uf(n,e,t){if(Wo(n)){t&&t(0);let a=Tl(n,e);return t&&t(1),Promise.resolve(a)}return Ko(n)?Lf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Vf(n,e){if(Wo(n))return Tl(n,e);if(Ko(n))return Ff(n,e);throw new Error("invalid JSON wallet")}var jf="wallet/5.7.0";var Hf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},wr=new E(jf);function p5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function y5(n){let e=n.mnemonic;return e&&e.phrase}var ln=class extends Nt{constructor(e,t){if(super(),p5(e)){let a=new Tn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",vn(this.publicKey)),this.address!==ce(e.address)&&wr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),y5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||va,locale:i.locale||"en"}));let r=this.mnemonic,s=St.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);vn(s.privateKey)!==this.address&&wr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(Tn.isSigningKey(e))e.curve!=="secp256k1"&&wr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new Tn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",vn(this.publicKey))}t&&!Xt.isProvider(t)&&wr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new ln(this,e)}signTransaction(e){return Re(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&wr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(os(t)));return os(t,a)})}signMessage(e){return Hf(this,void 0,void 0,function*(){return zr(this._signingKey().signDigest(rr(e)))})}_signTypedData(e,t,a){return Hf(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,r=>(this.provider==null&&wr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return zr(this._signingKey().signDigest(vt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),Al(this,e,t,a)}static createRandom(e){let t=na(16);e||(e={}),e.extraEntropy&&(t=j(Se(fe(ye([t,e.extraEntropy])),0,16)));let a=ki(t,e.locale);return ln.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Uf(e,t,a).then(i=>new ln(i))}static fromEncryptedJsonSync(e,t){return new ln(Vf(e,t))}static fromMnemonic(e,t,a){return t||(t=va),new ln(St.fromMnemonic(e,null,a).derivePath(t))}};function qf(n,e){return gi(rr(n),e)}function Gf(n,e,t,a){return gi(vt.hash(n,e,t),a)}var ra={};Ki(ra,{AlchemyProvider:()=>Cr,AlchemyWebSocketProvider:()=>ks,AnkrProvider:()=>As,BaseProvider:()=>ia,CloudflareProvider:()=>Es,EtherscanProvider:()=>Ms,FallbackProvider:()=>Is,Formatter:()=>X,InfuraProvider:()=>Sr,InfuraWebSocketProvider:()=>Rs,IpcProvider:()=>Ll,JsonRpcBatchProvider:()=>du,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Er,NodesmithProvider:()=>Ps,PocketProvider:()=>Ns,Provider:()=>Xt,Resolver:()=>Ar,StaticJsonRpcProvider:()=>_s,UrlJsonRpcProvider:()=>Rt,Web3Provider:()=>Ds,WebSocketProvider:()=>Ea,getDefaultProvider:()=>lu,getNetwork:()=>cs,isCommunityResourcable:()=>Cl,isCommunityResource:()=>xs,showThrottleMessage:()=>aa});var zf="networks/5.7.1";var Wf=new E(zf);function f5(n){return n&&typeof n.renetwork=="function"}function ka(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ka(t)},e}function Qo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Qo(n,a)},t}var Kf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ka("homestead")},Jf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ka("ropsten")},$f={chainId:63,name:"classicMordor",_defaultProvider:Qo("https://www.ethercluster.com/mordor","classicMordor")},$o={unspecified:{chainId:0,name:"unspecified"},homestead:Kf,mainnet:Kf,morden:{chainId:2,name:"morden"},ropsten:Jf,testnet:Jf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ka("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ka("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ka("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ka("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:$f,classicTestnet:$f,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Qo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ka("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ka("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function cs(n){if(n==null)return null;if(typeof n=="number"){for(let a in $o){let i=$o[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=$o[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=$o[n.name];if(!e)return typeof n.chainId!="number"&&Wf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Wf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(f5(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Qf="web/5.7.1";var c5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Yf(n,e){return c5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var m5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Dn=new E(Qf);function Xf(n){return new Promise(e=>{setTimeout(e,n)})}function ja(n,e){if(n==null)return null;if(typeof n=="string")return n;if(la(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function h5(n){return we(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function El(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Dn.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;Dn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Dn.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Dn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+ir(we(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ar(_[3]):h5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Dn.throwError("processing response error",E.errors.SERVER_ERROR,{body:ja(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Dn.makeError("timeout",E.errors.TIMEOUT,{requestBody:ja(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return m5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Dn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:ja(H,U.headers?U.headers["content-type"]:null),requestBody:ja(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Yt(r))}catch(l){Dn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=we(e);let r=typeof n=="string"?{url:n}:_e(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return El(n,i,a)}function Bn(n,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var Pl=Cn(nc());var Ee="providers/5.7.2";var hs=new E(Ee),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(f),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return dn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():hs.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Se(e,12));return t===mo?null:t}contractAddress(e){return mi(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return qn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?hs.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Fo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&hs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):hs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&hs.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function Cl(n){return n&&typeof n.isCommunityResource=="function"}function xs(n){return Cl(n)&&n.isCommunityResource()}var ac=!1;function aa(){ac||(ac=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ee),k5=10;function ic(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function rc(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[ic(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ic(e)}).join("&")}function A5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function kr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Ft(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+rc(n);if(Eo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+rc(n.topics||[])}throw new Error("invalid event - "+n)}function bs(){return new Date().getTime()}function sc(n){return new Promise(e=>{setTimeout(e,n)})}var E5=["block","network","pending","poll"],Nl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=A5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||E5.indexOf(this.tag)>=0}},M5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Il(n){return me(F.from(n).toHexString(),32)}function oc(n){return ga.encode(ye([n,Se(en(en(n)),0,4)]))}var lc=new RegExp("^(ipfs)://(.*)$","i"),uc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),lc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eu(n,e){try{return Yt(gs(n,e))}catch{}return null}function gs(n,e){if(n==="0x")return null;let t=F.from(Se(n,e,e+32)).toNumber(),a=F.from(Se(n,t,t+32)).toNumber();return Se(n,t+32,t+32+a)}function Sl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function dc(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function C5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function pc(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:At([e,Oa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=At(["0x9061b923",pc([as(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=gs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?gs(a,0):null})}_getAddress(e,t){let a=M5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return oc(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return oc(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Pl.default.toWords(i.slice(2));return o.unshift(s),Pl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===tr?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Il(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=we(e);t=ye([Il(64),Il(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Rl=null,I5=1,ia=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=bt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Bn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Rl==null&&(Rl=new X),Rl}static getNetwork(e){return cs(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield On({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(bs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=bs(),a=Re({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=bs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=I5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield sc(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=bs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield sc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Re({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>qn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Re(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Re(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=k5&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Ft(r)%32===4)try{let s=Se(r,4),o=Se(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Se(s,32,64)).toNumber(),f=F.from(Se(s,p,p+32)).toNumber(),x=Se(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Bn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Re({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new Ar(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Oa(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=eu(yield this.call({to:a,data:"0x691f3431"+Oa(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new Ar(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=eu(yield this.call({to:s,data:"0x691f3431"+Oa(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new Nl(kr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=kr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=kr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=kr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=kr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=kr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var Aa=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Mt=new E(Ee),S5=["call","estimateGas"];function vs(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=vs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return vs(JSON.parse(n),e)}catch{}return null}function fc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=vs(e,!0);if(r)return r.data;Mt.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=vs(e.body,!1);r==null&&(r=vs(e,!1)),r&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Mt.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Mt.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Mt.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),S5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Mt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function yc(n){return new Promise(function(e){setTimeout(e,n)})}function R5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function Ts(n){return n&&n.toLowerCase()}var Dl={},Er=class extends Nt{constructor(e,t,a){if(super(),e!==Dl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):Mt.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ol(Dl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Mt.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=_e(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>Aa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&Mt.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Re({tx:Re(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&Mt.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),fc("sendTransaction",s,r)))})}signTransaction(e){return Mt.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Aa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Bn(()=>Aa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return Aa(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return Aa(this,void 0,void 0,function*(){let t=typeof e=="string"?we(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return Aa(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(vt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Mt.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return Aa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Ol=class extends Er{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},P5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends ia{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=bt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Aa(this,void 0,void 0,function*(){yield yc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=bt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Er(Dl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:xt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=On(this.connection,JSON.stringify(a),R5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Ts(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Ts(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Ts(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Ts(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=bt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=bt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=Ts(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return Aa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&Mt.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return fc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return yc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=_e(P5);if(t)for(let r in t)t[r]&&(a[r]=!0);Qi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=qn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=dn(e.accessList)),i}};var Mr=null;try{if(Mr=WebSocket,Mr==null)throw new Error("inject please")}catch{let e=new E(Ee);Mr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Bl=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tu=new E(Ee),N5=1,Ea=class extends tn{constructor(e,t){t==="any"&&tu.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Mr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){tu.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){tu.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Bl(this,void 0,void 0,function*(){return null})}set polling(e){!e||tu.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=N5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Bl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Bl(this,void 0,void 0,function*(){this.websocket.readyState===Mr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var D5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ws=new E(Ee),_s=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return D5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ws.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Rt=class extends _s{constructor(e,t){ws.checkAbstract(new.target,Rt),e=bt(new.target,"getNetwork")(e),t=bt(new.target,"getApiKey")(t);let a=bt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){ws.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ws.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ws.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var cc=new E(Ee),nu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ks=class extends Ea{constructor(e,t){let a=new Cr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===nu}},Cr=class extends Rt{static getWebSocketProvider(e,t){return new ks(e,t)}static getApiKey(e){return e==null?nu:(e&&typeof e!="string"&&cc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:cc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===nu&&aa(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nu}};var O5=new E(Ee),au="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function B5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return O5.throwArgumentError("unsupported network","name",n)}var As=class extends Rt{isCommunityResource(){return this.apiKey===au}static getApiKey(e){return e??au}static getUrl(e,t){t==null&&(t=au);let a={allowGzip:!0,url:"https://"+B5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===au&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var F5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},mc=new E(Ee),Es=class extends Rt{static getApiKey(e){return e!=null&&mc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:mc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return F5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var iu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ha=new E(Ee);function hc(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=qn(W(a)):t==="accessList"?a="["+dn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function L5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function xc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function bc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Fl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Ha.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Ha.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ha.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Ha.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Ha.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var Ms=class extends ia{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Ha.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return iu(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?xc:L5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&aa(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield On(o,l,s||xc);return this.emit("debug",{action:"response",request:i,response:xt(p),provider:this}),p})}detectNetwork(){return iu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return iu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Fl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=hc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Fl("call",r,t.transaction)}}case"estimateGas":{let i=hc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Fl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=bc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=bc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ha.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ha.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var ou=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ai=new E(Ee);function ru(){return new Date().getTime()}function gc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ir(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Ir(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Ir(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var U5=1;function vc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var V5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],j5=["address","args","errorArgs","errorSignature","method","transaction"];function su(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function H5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function q5(n,e,t){let a=Ir;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Tc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return Tc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Ir(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Ir(i))}:a=function(i){return i==null?null:Ir(i)};break;default:throw new Error("unknown method: "+e)}return H5(a,n.quorum)}function Cs(n,e){return ou(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Bn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function G5(n,e,t,a){return ou(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield Cs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Cs(n,e)),i.getLogs(r)}}return Ai.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Is=class extends ia{constructor(e,t){e.length===0&&Ai.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=xs(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=xs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ai.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&Ai.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=gc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return ou(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return gc(e)})}perform(e,t){return ou(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=ru(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=G5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,ru()),request:{method:e,params:xt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,ru()),request:{method:e,params:xt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:su(_,null),request:{method:e,params:xt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield vc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return V5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};j5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ai.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ai.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>su(l)),provider:this})})}};var Ll=null;var uu=new E(Ee),Ss="84842078b09946638c03157f83405213",Rs=class extends Ea{constructor(e,t){let a=new Sr(e,t),i=a.connection;i.password&&uu.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Ss}},Sr=class extends Rt{static getWebSocketProvider(e,t){return new Rs(e,t)}static getApiKey(e){let t={apiKey:Ss,projectId:Ss,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(uu.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),uu.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:uu.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Ss&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Ss}};var du=class extends tn{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:xt(o),provider:this}),On(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ul=new E(Ee),z5="ETHERS_JS_SHARED",Ps=class extends Rt{static getApiKey(e){return e&&typeof e!="string"&&Ul.throwArgumentError("invalid apiKey","apiKey",e),e||z5}static getUrl(e,t){Ul.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ul.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var wc=new E(Ee),_c="62e1ad51b37b8e00394bda3b",Ns=class extends Rt{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=_c:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:wc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:wc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===_c}};var kc=new E(Ee),W5=1;function Ac(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:W5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:xt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function K5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:xt(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var Ds=class extends tn{constructor(e,t){e==null&&kc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=K5(e)):e.sendAsync?i=Ac(e,e.sendAsync.bind(e)):e.send?i=Ac(e,e.send.bind(e)):kc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Ec=new E(Ee);function lu(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new tn(n);case"ws":case"wss":return new Ea(n);default:Ec.throwArgumentError("unsupported URL scheme","network",n)}}let t=cs(n);return(!t||!t._defaultProvider)&&Ec.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Is,AlchemyProvider:Cr,AnkrProvider:As,CloudflareProvider:Es,EtherscanProvider:Ms,InfuraProvider:Sr,JsonRpcProvider:tn,NodesmithProvider:Ps,PocketProvider:Ns,Web3Provider:Ds,IpcProvider:null},e)}var te={};Ki(te,{AbiCoder:()=>nr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>Te,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>St,Indexed:()=>ca,Interface:()=>Ba,LogDescription:()=>sr,Logger:()=>E,ParamType:()=>ct,RLP:()=>so,SigningKey:()=>Tn,SupportedAlgorithm:()=>ta,TransactionDescription:()=>or,TransactionTypes:()=>Bo,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>To,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>vt,_fetchData:()=>El,_toEscapedUtf8String:()=>Rd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ga,base64:()=>Fd,checkProperties:()=>Qi,checkResultErrors:()=>Xi,commify:()=>Dc,computeAddress:()=>vn,computeHmac:()=>Ta,computePublicKey:()=>ss,concat:()=>ye,deepCopy:()=>xt,defaultAbiCoder:()=>ts,defaultPath:()=>va,defineReadOnly:()=>B,dnsEncode:()=>as,entropyToMnemonic:()=>ki,fetchJson:()=>On,formatBytes32String:()=>Pd,formatEther:()=>Oc,formatUnits:()=>Vl,getAccountPath:()=>Ef,getAddress:()=>ce,getContractAddress:()=>mi,getCreate2Address:()=>Uy,getIcapAddress:()=>Ly,getJsonWalletAddress:()=>vl,getStatic:()=>bt,hashMessage:()=>rr,hexConcat:()=>At,hexDataLength:()=>Ft,hexDataSlice:()=>Se,hexStripZeros:()=>Td,hexValue:()=>qn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Fy,isBytes:()=>fn,isBytesLike:()=>la,isHexString:()=>ie,isValidMnemonic:()=>Af,isValidName:()=>Ud,joinSignature:()=>zr,keccak256:()=>fe,mnemonicToEntropy:()=>Tr,mnemonicToSeed:()=>cl,namehash:()=>Oa,nameprep:()=>Bd,parseBytes32String:()=>Nd,parseEther:()=>Bc,parseTransaction:()=>Fo,parseUnits:()=>jl,poll:()=>Bn,randomBytes:()=>na,recoverAddress:()=>gi,recoverPublicKey:()=>Oo,resolveProperties:()=>Re,ripemd160:()=>ds,serializeTransaction:()=>os,sha256:()=>en,sha512:()=>ll,shallowCopy:()=>_e,shuffled:()=>ys,solidityKeccak256:()=>Ic,solidityPack:()=>pu,soliditySha256:()=>Sc,splitSignature:()=>Gn,stripZeros:()=>nn,toUtf8Bytes:()=>we,toUtf8CodePoints:()=>Da,toUtf8String:()=>Yt,verifyMessage:()=>qf,verifyTypedData:()=>Gf,zeroPad:()=>pi});var Mc="solidity/5.7.0";var J5=new RegExp("^bytes([0-9]+)$"),$5=new RegExp("^(u?int)([0-9]*)$"),Q5=new RegExp("^(.*)\\[([0-9]*)\\]$"),Y5="0000000000000000000000000000000000000000000000000000000000000000",Rr=new E(Mc);function Cc(n,e,t){switch(n){case"address":return t?pi(e,32):j(e);case"string":return we(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?pi(e,32):j(e)}let a=n.match($5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Rr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),pi(e,i/8)}if(a=n.match(J5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Rr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Rr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+Y5).substring(0,66)):e}if(a=n.match(Q5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Rr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Cc(i,o,!0))}),ye(s)}return Rr.throwArgumentError("invalid type","type",n)}function pu(n,e){n.length!=e.length&&Rr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Cc(a,e[i]))}),W(ye(t))}function Ic(n,e){return fe(pu(n,e))}function Sc(n,e){return en(pu(n,e))}var Rc="units/5.7.0";var Pc=new E(Rc),Nc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Dc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Pc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Vl(n,e){if(typeof e=="string"){let t=Nc.indexOf(e);t!==-1&&(e=3*t)}return $i(n,e??18)}function jl(n,e){if(typeof n!="string"&&Pc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Nc.indexOf(e);t!==-1&&(e=3*t)}return mn(n,e??18)}function Oc(n){return Vl(n,18)}function Bc(n){return jl(n,18)}var yu="ethers/5.7.2";var Fc=new E(yu);try{let n=window;n._ethers==null&&(n._ethers=Hl)}catch{}var Fn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Fn||(Fn={}));var Lc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Lc||(Lc={}));var fu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(fu||(fu={}));var Pr;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Pr||(Pr={}));var cu;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(cu||(cu={}));var ql;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(ql||(ql={}));var Os;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Os||(Os={}));var Bs;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Bs||(Bs={}));var Gl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Gl||(Gl={}));var Ae;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(Ae||(Ae={}));var Bt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(Bt||(Bt={}));var Wl="0x12345678",zl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(zl||(zl={}));var Me;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(Me||(Me={}));var xe;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(xe||(xe={}));var Kl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ei=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};be(Ei,"abi",Kl);var Jl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Mi=class{static createInterface(){return new te.Interface(Jl)}static connect(e,t){return new oe(e,Jl,t)}};be(Mi,"abi",Jl);var Uc=(n,e)=>{throw new Error(`${e}: ${n}`)},$l=n=>n!=null;var{keccak256:Z5,toUtf8Bytes:eb}=te,{MaxUint256:tb}=gt;var Nr=n=>te.formatEther(n),Dr=n=>te.parseEther(n),pn=n=>Dr(n[0]),Ql=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(Me.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter($l)},Ci=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return tb;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},qa=n=>Z5(eb(n));var Or=async(n,e)=>(await Mi.connect(n,e).version()).toNumber(),Yl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter($l);var{hexDataSlice:Xl}=te,{MaxUint256:nb}=gt,Vc=n=>{let e=Xl(n,0,3),t=F.from(Xl(n,4,35)),a=F.from(Xl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},jc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),nb,r];let o=F.from(Ae.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await Ci(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},ab=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>jc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?sa(n,e,t,a[0],i):ab(n,e,t,a,i):jc(n,e,t,a,i);var{MaxUint256:Hc}=gt,{AddressZero:ib}=gt;async function rb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),mu(t)}catch{return[]}}async function Fs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Vc(s),I=Ei.connect(r,a.signer||a.provider),_=await rb(I,p);if(_.includes(Me.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${Ae.RootDomain}`);o=Hc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Hc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,ib);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:sb}=gt,oa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Fn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Pr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await oa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await oa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await oa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return oa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${sb}/noProof`,s=await oa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Ct=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var qc=10,Wk=Ct(qc),Gc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},zc=qc-1;var Wc=3,$k=Ct(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Jc=Wc-1;var $c=10,Xk=Ct($c),Qc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Yc=$c-1;var Xc=7,tA=Ct(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[]},em=Xc-1;var tm=8,iA=Ct(tm),nm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},am=tm-1;var im=5,oA=Ct(im),rm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},sm=im-1;var om=7,lA=Ct(om),um={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},dm=om-1;var lm=10,fA=Ct(lm),pm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},ym=lm-1;var fm=14,hA=Ct(fm),Zl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},ep=fm-1;var cm=18,ob=Ct(cm),gA=cm-1;var ub=(n,e)=>{switch(n){case xe.FundingQueue:return Gc[e];case xe.IVotingReputation:return Zl[e];case xe.MultisigPermissions:return Kc[e];case xe.OneTxPayment:return Qc[e];case xe.ReputationBootstrapper:return Zc[e];case xe.StagedExpenditure:return rm[e];case xe.StakedExpenditure:return nm[e];case xe.StreamingPayments:return um[e];case xe.TokenSupplier:return pm[e];case xe.VotingReputation:return Zl[e];default:return Uc(n,"Could not find extension with name")}},ua=(n,e,t)=>{let a=ub(n,e);return!!a&&!a.includes(t)};var Br={[xe.FundingQueue]:zc,[xe.IVotingReputation]:ep,[xe.MultisigPermissions]:Jc,[xe.OneTxPayment]:Yc,[xe.ReputationBootstrapper]:em,[xe.StagedExpenditure]:sm,[xe.StakedExpenditure]:am,[xe.StreamingPayments]:dm,[xe.TokenSupplier]:ym,[xe.VotingReputation]:ep};var B6=Cn(mm(),1);var wp=Cn(N6(),1);var Ne;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Ne||(Ne={}));var vp=2,Tp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(Tp||(Tp={}));var D6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,v1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),_p=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==vp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Ne.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=D6(t.errors);throw new Error(a)};var O6=(n,e)=>{let t=n===Ne.Colony?v1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:vp});if(!a.success){let i=D6(a.errors);throw new Error(i)}return a.data};var kp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},Ap=kp;var Ep=(0,B6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),zs={[Ne.Annotation]:"Annotation(address,bytes32,string)",[Ne.Colony]:"ColonyMetadata(address,string)",[Ne.Decision]:"Annotation(address,bytes32,string)",[Ne.Domain]:"DomainMetadata(address,uint256,string)",[Ne.Misc]:"",[Ne.DEFAULT]:""},jr=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(zs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ep(a)).json();return _p(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ep(a)).json(),s=Object.entries(zs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return _p(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await Ep(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=O6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var qE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],En=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};be(En,"abi",Mp);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Mn=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};be(Mn,"abi",Cp);var Ip=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Di,"abi",Ip);var $u=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],F6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",A1=n=>n.length>1,Ln=class extends vi{constructor(...e){A1(e)?super(...e):super($u,F6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface($u)}static connect(e,t){return new oe(e,$u,t)}};be(Ln,"bytecode",F6),be(Ln,"abi",$u);var Sp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Oi,"abi",Sp);var Bi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Bi||(Bi={}));var Un;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Un||(Un={}));var{AddressZero:I1}=gt;async function S1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var R1=async(n,e)=>{let t,a=!0,i=!0;t=Ln.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await S1(t)}catch{a=!1}try{await t.nonces(I1)}catch{i=!1}return a?t.tokenClientType=Un.Colony:i?(t=Mn.connect(n,e),t.tokenClientType=Un.Erc2612):(t=En.connect(n,e),t.tokenClientType=Un.Erc20),t.clientType=Bi.TokenClient,t},Rp=R1;var P1=(n,e)=>{let t=Oi.connect(n,e);return t.clientType=Bi.TokenLockingClient,t},Pp=P1;var{AddressZero:Np}=gt,N1=En.connect(Np,new ra.BaseProvider(3656691)).interface,D1=Di.connect(Np,new ra.BaseProvider(3656691)).interface,O1=Mn.connect(Np,new ra.BaseProvider(3656691)).interface;var Dp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ws.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ks=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ks.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Fi.abi=Bp;var Ma=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,zs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:F1,solidityKeccak256:L1,splitSignature:U1}=te,Wa=class extends Ma{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Fn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=L1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=F1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=U1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Qu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=Ae.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Li=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Li.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Ui.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Vi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};ji.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Hi.abi=jp;var Hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};qi.abi=Hp;var{AddressZero:W1}=gt,Vn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Vn.extensionType),e.address);if(t===W1)throw new Error(`${Vn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Vn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Vn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Vn(e,r,a)}static getLatestSupportedVersion(){return Vn.supportedVersions[Vn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||Ae.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding],this.oneTxPaymentContract.address),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding]);return[_,v,S,L,f,I,x,s,Ae.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ka=Vn;Ka.supportedVersions=[{version:3,factory:ji},{version:4,factory:Hi},{version:5,factory:qi}],Ka.extensionType=xe.OneTxPayment;var jn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Js=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Ln.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var $s=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Mn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var L6=async(n,e)=>{let t=await Rp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Un.Colony:return new Js(n,t);case Un.Erc20:return new jn(n,t);case Un.Erc2612:return new $s(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Gi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};zi.abi=Gp;var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Wi.abi=zp;var{AddressZero:Wp}=gt;var Yu=F.from(10).pow(18),Hn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Hn.extensionType),e.address);if(t===Wp)throw new Error(`${Hn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Hn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Hn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Hn(e,r,a)}static getLatestSupportedVersion(){return Hn.supportedVersions[Hn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Fs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,Wl);return[e,t,Wp,Wl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Ne.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Decision})}approveStake(e,t=Ae.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Qu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Bt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Bt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Nr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Me.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await Ci(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==Bt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Bt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ja=Hn;Ja.supportedVersions=[{version:7,factory:Gi},{version:8,factory:zi},{version:9,factory:Wi}],Ja.extensionType=xe.VotingReputation;var Q1={["motion"]:Ja,["oneTx"]:Ka},qr=class{static async connect(e,t){let a=await Or(t,e.config.signerOrProvider),i=qr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await L6(e,s),l=new qr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return qr.supportedVersions[qr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new oa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ka.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new jn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Ne.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Ne.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[Ae.RootDomain],{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Ne.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Me.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=Ae.RootDomain,s=a||Ae.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await sa(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Me.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ci(x,this.colony,r,s),_=await Ci(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=Ae.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=Ae.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Ne.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Annotation})}installExtension(e){let t=Q1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ua(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[qa(i),t.getLatestSupportedVersion()],async s=>({...Qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=Ae.RootDomain){let a=await this.colony.getUserRoles(e,t);return mu(a)}setRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:Me.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Gr=qr;Gr.supportedVersions=[{version:11,factory:Li},{version:12,factory:Ui},{version:13,factory:Vi}];var{splitSignature:Y1}=te,Xu=class extends Ma{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Fn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=Y1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Ys=class{constructor(e,t){let a=t?.network||Fn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||cu[a],this.ipfs=new jr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Pr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:U6}=te,{AddressZero:Kp}=gt,Xs=class{constructor(e,t){this.config=new Ys(e,t),this.contract=Fi.connect(t?.customNetworkAddress||fu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ma({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Xu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Ne.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Ne.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Gr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.config.network],""):null}async getColonyAddress(e){let t=U6(`${e}${Os[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.config.network],""):null}async getUserAddress(e){let t=U6(`${e}${Bs[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var V6=async n=>{if(!n.ext.oneTx){if(!ua(xe.OneTxPayment,Br[xe.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Br[xe.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Me.Administration,Me.Funding]).tx().mined()}},j6=async n=>{if(!n.ext.motions){if(!ua(xe.VotingReputation,Br[xe.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Br[xe.VotingReputation]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("motion").tx().mined(),await n.updateExtensions(),!n.ext.motions)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.motions;await n.setRoles(e.address,[Me.Recovery,Me.Root,Me.Arbitration,Me.Architecture,Me.Funding,Me.Administration]).tx().mined(),await(await e.getInternalVotingReputationContract().initialise(pn`0.01`,pn`0.2`,pn`0.01`,pn`0.7`,6*60,6*60,6*60,6*60)).wait()}};var{isAddress:eg}=te,Jp=new ra.JsonRpcProvider("http://127.0.0.1:8545"),ed,Oe,yn,tg=()=>new ln("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Jp),ng=async n=>{let e=tg();ed=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),Oe=await ed.getMetaColony()},ag=async()=>{if(await V6(Oe),await j6(Oe),Oe=await ed.getMetaColony(),!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");await Oe.mint(pn`500`).tx().mined(),await Oe.claimFunds().tx().mined(),await Oe.ext.oneTx.pay("0xb77D57F4959eAfA0339424b83FcFaf9c15407461",pn`100`).tx().mined(),await Oe.ext.oneTx.pay("0x9df24e73f40b2a911eb254a8825103723e13209c",pn`20`).tx().mined()},ig=async n=>{if(!Oe.ext.motions)throw new Error("VotingReputation extension not installed");if(!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[{motionId:e}]=await Oe.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Dr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},rg=async n=>{if(!Oe.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Oe.ext.motions.getMotion(n);yn=F.from(n);let t=await Oe.ext.motions?.getRemainingStakes(n),a=await Oe.ext.motions.getMotionState(n);return{...e,motionState:Bt[a],remainingStakes:t}},sg=async()=>{await Oe.token.approve(pn`20`).tx().mined(),await(await ed.getTokenLocking()).deposit(Oe.token.address,pn`20`).tx().mined(),await Oe.ext.motions?.approveStake(pn`20`).tx().mined()},og=async n=>{await Oe.ext.motions?.stakeMotion(yn,1,n).tx().mined()},ug=async n=>{await Oe.ext.motions?.stakeMotion(yn,0,n).tx().mined()},dg=async()=>{await Oe.ext.motions?.submitVote(yn,1).tx().mined()},lg=async()=>{await Oe.ext.motions?.submitVote(yn,0).tx().mined()},pg=async()=>{await Qp(7*60),await Oe.ext.motions?.revealVote(yn).tx().mined()},yg=async()=>{await Qp(7*60),await Oe.ext.motions?.finalizeMotion(yn).tx().mined()},Qp=async n=>{await Jp.send("evm_increaseTime",[n]),await Jp.send("evm_mine",[])},Zu=document.querySelector("#address"),$p=document.querySelector("#payment_amount"),Yp=document.querySelector("#stake_amount"),H6=document.querySelector("#button_create_motion"),q6=document.querySelector("#motion_id"),G6=document.querySelector("#button_connect"),z6=document.querySelector("#button_bootstrap"),W6=document.querySelector("#button_stake_clny"),K6=document.querySelector("#button_get_motion"),J6=document.querySelector("#button_jump"),$6=document.querySelector("#button_stake_yay"),Q6=document.querySelector("#button_stake_nay"),Y6=document.querySelector("#button_vote_yay"),X6=document.querySelector("#button_vote_nay"),Z6=document.querySelector("#button_reveal"),eh=document.querySelector("#button_finalize"),Xp=document.querySelector("#error"),th=document.querySelector("#result");if(!Zu||!$p||!q6||!Yp||!Xp||!th||!G6||!z6||!W6||!H6||!K6||!J6||!$6||!Q6||!Y6||!X6||!Z6||!eh)throw new Error("Could not find all required HTML elements");var Pt=n=>{Xp.innerText=`Found an error: ${n.message}`,console.error(n)},da=()=>{Xp.innerText=""},ke=n=>{th.innerText=n};G6.addEventListener("click",async()=>{da();let n=Zu.value;if(!eg(n))return Pt(new Error("This is not a valid address"));ke("Processing...");try{await ng(Zu.value),ke(` +`)}`,v1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),_p=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==vp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Ne.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=D6(t.errors);throw new Error(a)};var O6=(n,e)=>{let t=n===Ne.Colony?v1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:vp});if(!a.success){let i=D6(a.errors);throw new Error(i)}return a.data};var kp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},Ap=kp;var Ep=(0,B6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),zs={[Ne.Annotation]:"Annotation(address,bytes32,string)",[Ne.Colony]:"ColonyMetadata(address,string)",[Ne.Decision]:"Annotation(address,bytes32,string)",[Ne.Domain]:"DomainMetadata(address,uint256,string)",[Ne.Misc]:"",[Ne.DEFAULT]:""},jr=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(zs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ep(a)).json();return _p(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ep(a)).json(),s=Object.entries(zs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return _p(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await Ep(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=O6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var qE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],En=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};be(En,"abi",Mp);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Mn=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};be(Mn,"abi",Cp);var Ip=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Di,"abi",Ip);var $u=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],F6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",A1=n=>n.length>1,Ln=class extends vi{constructor(...e){A1(e)?super(...e):super($u,F6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface($u)}static connect(e,t){return new oe(e,$u,t)}};be(Ln,"bytecode",F6),be(Ln,"abi",$u);var Sp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Oi,"abi",Sp);var Bi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Bi||(Bi={}));var Un;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Un||(Un={}));var{AddressZero:I1}=gt;async function S1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var R1=async(n,e)=>{let t,a=!0,i=!0;t=Ln.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await S1(t)}catch{a=!1}try{await t.nonces(I1)}catch{i=!1}return a?t.tokenClientType=Un.Colony:i?(t=Mn.connect(n,e),t.tokenClientType=Un.Erc2612):(t=En.connect(n,e),t.tokenClientType=Un.Erc20),t.clientType=Bi.TokenClient,t},Rp=R1;var P1=(n,e)=>{let t=Oi.connect(n,e);return t.clientType=Bi.TokenLockingClient,t},Pp=P1;var{AddressZero:Np}=gt,N1=En.connect(Np,new ra.BaseProvider(3656691)).interface,D1=Di.connect(Np,new ra.BaseProvider(3656691)).interface,O1=Mn.connect(Np,new ra.BaseProvider(3656691)).interface;var Dp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ws.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ks=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Ks.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Fi.abi=Bp;var Ma=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,zs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:F1,solidityKeccak256:L1,splitSignature:U1}=te,Wa=class extends Ma{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Fn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=L1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=F1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=U1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Qu=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=Ae.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Li=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Li.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Ui.abi=Lp;var Up=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Vi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};ji.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Hi.abi=jp;var Hp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};qi.abi=Hp;var{AddressZero:W1}=gt,Vn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Vn.extensionType),e.address);if(t===W1)throw new Error(`${Vn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Vn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Vn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Vn(e,r,a)}static getLatestSupportedVersion(){return Vn.supportedVersions[Vn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||Ae.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding],this.oneTxPaymentContract.address),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding]);return[_,v,S,L,f,I,x,s,Ae.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ka=Vn;Ka.supportedVersions=[{version:3,factory:ji},{version:4,factory:Hi},{version:5,factory:qi}],Ka.extensionType=xe.OneTxPayment;var jn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Js=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Ln.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var $s=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Mn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var L6=async(n,e)=>{let t=await Rp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Un.Colony:return new Js(n,t);case Un.Erc20:return new jn(n,t);case Un.Erc2612:return new $s(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Gi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};zi.abi=Gp;var zp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Wi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Wi.abi=zp;var{AddressZero:Wp}=gt;var Yu=F.from(10).pow(18),Hn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Hn.extensionType),e.address);if(t===Wp)throw new Error(`${Hn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Hn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Hn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Hn(e,r,a)}static getLatestSupportedVersion(){return Hn.supportedVersions[Hn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Fs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,Wl);return[e,t,Wp,Wl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Ne.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Decision})}approveStake(e,t=Ae.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Qu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Bt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Bt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Nr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Me.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Bt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Bt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await Ci(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==Bt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Bt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Ja=Hn;Ja.supportedVersions=[{version:7,factory:Gi},{version:8,factory:zi},{version:9,factory:Wi}],Ja.extensionType=xe.VotingReputation;var Q1={["motion"]:Ja,["oneTx"]:Ka},qr=class{static async connect(e,t){let a=await Or(t,e.config.signerOrProvider),i=qr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await L6(e,s),l=new qr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return qr.supportedVersions[qr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new oa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ka.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new jn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Ne.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Ne.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[Ae.RootDomain],{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Ne.Domain,e),[Ae.RootDomain,t]},{roles:Me.Architecture,domain:Ae.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Ne.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Me.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=Ae.RootDomain,s=a||Ae.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await sa(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Me.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ci(x,this.colony,r,s),_=await Ci(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=Ae.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=Ae.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Ne.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Annotation})}installExtension(e){let t=Q1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ua(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[qa(i),t.getLatestSupportedVersion()],async s=>({...Qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=Ae.RootDomain){let a=await this.colony.getUserRoles(e,t);return mu(a)}setRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=Ae.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ql(r);return[e,a,s]},{roles:Me.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=Ae.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:Me.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Gr=qr;Gr.supportedVersions=[{version:11,factory:Li},{version:12,factory:Ui},{version:13,factory:Vi}];var{splitSignature:Y1}=te,Xu=class extends Ma{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Fn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=Y1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Ys=class{constructor(e,t){let a=t?.network||Fn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||cu[a],this.ipfs=new jr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Pr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:U6}=te,{AddressZero:Kp}=gt,Xs=class{constructor(e,t){this.config=new Ys(e,t),this.contract=Fi.connect(t?.customNetworkAddress||fu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ma({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Xu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Ne.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Ne.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Gr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.config.network],""):null}async getColonyAddress(e){let t=U6(`${e}${Os[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.config.network],""):null}async getUserAddress(e){let t=U6(`${e}${Bs[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var V6=async n=>{if(!n.ext.oneTx){if(!ua(xe.OneTxPayment,Br[xe.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Br[xe.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Me.Administration,Me.Funding]).tx().mined()}},j6=async n=>{if(!n.ext.motions){if(!ua(xe.VotingReputation,Br[xe.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Br[xe.VotingReputation]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("motion").tx().mined(),await n.updateExtensions(),!n.ext.motions)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.motions;await n.setRoles(e.address,[Me.Recovery,Me.Root,Me.Arbitration,Me.Architecture,Me.Funding,Me.Administration]).tx().mined(),await(await e.getInternalVotingReputationContract().initialise(pn`0.01`,pn`0.2`,pn`0.01`,pn`0.7`,6*60,6*60,6*60,6*60)).wait()}};var{isAddress:eg}=te,Jp=new ra.JsonRpcProvider("http://127.0.0.1:8545"),ed,Oe,yn,tg=()=>new ln("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Jp),ng=async n=>{let e=tg();ed=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),Oe=await ed.getMetaColony()},ag=async()=>{if(await V6(Oe),await j6(Oe),Oe=await ed.getMetaColony(),!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");await Oe.mint(pn`500`).tx().mined(),await Oe.claimFunds().tx().mined(),await Oe.ext.oneTx.pay("0xb77D57F4959eAfA0339424b83FcFaf9c15407461",pn`100`).tx().mined(),await Oe.ext.oneTx.pay("0x9df24e73f40b2a911eb254a8825103723e13209c",pn`20`).tx().mined()},ig=async n=>{if(!Oe.ext.motions)throw new Error("VotingReputation extension not installed");if(!Oe.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[{motionId:e}]=await Oe.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Dr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},rg=async n=>{if(!Oe.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Oe.ext.motions.getMotion(n);yn=F.from(n);let t=await Oe.ext.motions?.getRemainingStakes(n),a=await Oe.ext.motions.getMotionState(n);return{...e,motionState:Bt[a],remainingStakes:t}},sg=async()=>{await Oe.token.approve(pn`20`).tx().mined(),await(await ed.getTokenLocking()).deposit(Oe.token.address,pn`20`).tx().mined(),await Oe.ext.motions?.approveStake(pn`20`).tx().mined()},og=async n=>{await Oe.ext.motions?.stakeMotion(yn,1,n).tx().mined()},ug=async n=>{await Oe.ext.motions?.stakeMotion(yn,0,n).tx().mined()},dg=async()=>{await Oe.ext.motions?.submitVote(yn,1).tx().mined()},lg=async()=>{await Oe.ext.motions?.submitVote(yn,0).tx().mined()},pg=async()=>{await Qp(7*60),await Oe.ext.motions?.revealVote(yn).tx().mined()},yg=async()=>{await Qp(7*60),await Oe.ext.motions?.finalizeMotion(yn).tx().mined()},Qp=async n=>{await Jp.send("evm_increaseTime",[n]),await Jp.send("evm_mine",[])},Zu=document.querySelector("#address"),$p=document.querySelector("#payment_amount"),Yp=document.querySelector("#stake_amount"),H6=document.querySelector("#button_create_motion"),q6=document.querySelector("#motion_id"),G6=document.querySelector("#button_connect"),z6=document.querySelector("#button_bootstrap"),W6=document.querySelector("#button_stake_clny"),K6=document.querySelector("#button_get_motion"),J6=document.querySelector("#button_jump"),$6=document.querySelector("#button_stake_yay"),Q6=document.querySelector("#button_stake_nay"),Y6=document.querySelector("#button_vote_yay"),X6=document.querySelector("#button_vote_nay"),Z6=document.querySelector("#button_reveal"),eh=document.querySelector("#button_finalize"),Xp=document.querySelector("#error"),th=document.querySelector("#result");if(!Zu||!$p||!q6||!Yp||!Xp||!th||!G6||!z6||!W6||!H6||!K6||!J6||!$6||!Q6||!Y6||!X6||!Z6||!eh)throw new Error("Could not find all required HTML elements");var Pt=n=>{Xp.innerText=`Found an error: ${n.message}`,console.error(n)},da=()=>{Xp.innerText=""},ke=n=>{th.innerText=n};G6.addEventListener("click",async()=>{da();let n=Zu.value;if(!eg(n))return Pt(new Error("This is not a valid address"));ke("Processing...");try{await ng(Zu.value),ke(` Connected to Colony with address: ${Oe.address}. Colony version: ${Oe.version}. `)}catch(e){Pt(e),ke("")}finally{Zu.value=""}return null});z6.addEventListener("click",async()=>{da(),ke("Processing...");try{await ag()}catch(n){Pt(n),ke("")}ke("Everything was set up successfully. You may now proceed. Remember, this is only necessary once for this example (even after reload)")});W6.addEventListener("click",async()=>{da(),ke("Processing...");try{await sg()}catch(n){Pt(n),ke("")}ke("Successfully approved tokens for use in staking")});H6.addEventListener("click",async()=>{da(),ke("Processing...");try{let n=$p.value,e=await ig(n);ke(`Motion created! Motion ID is: ${e}`)}catch(n){Pt(n),ke("")}finally{$p.value=""}return null});K6.addEventListener("click",async()=>{let n=q6.value;ke("Processing...");try{let{domainId:e,altTarget:t,action:a,motionState:i,remainingStakes:r}=await rg(n),s={domainId:e.toString(),altTarget:t,action:a,motionState:i,remainingYayStakes:Nr(r.remainingToFullyYayStaked),remainingNayStakes:Nr(r.remainingToFullyNayStaked)};ke(JSON.stringify(s))}catch(e){Pt(e),ke("")}});J6.addEventListener("click",async()=>{await Qp(3600),ke("Whooo that was a hell of a ride. Welcome to the future")});$6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");let n=Dr(Yp.value);try{await og(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Q6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");let n=Dr(Yp.value);try{await ug(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Y6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await dg()}catch(n){Pt(n),ke("");return}ke("Voted yay!")});X6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await lg()}catch(n){Pt(n),ke("");return}ke("Voted nay!")});Z6.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await pg()}catch(n){Pt(n),ke("");return}ke("Vote successfully revealed!")});eh.addEventListener("click",async()=>{if(da(),!yn){Pt(new Error("Please get a motion first (in the previous step) to stake for"));return}ke("Processing...");try{await yg()}catch(n){Pt(n),ke("");return}ke("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); diff --git a/local-reputation.js b/local-reputation.js index 2f06a8ab2..8e1cbf404 100644 --- a/local-reputation.js +++ b/local-reputation.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Gx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var zx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",is=null;function xf(n){if(is==null&&(is=zx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw is=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ll=class extends xn{constructor(){super("en")}getWord(e){return xf(this),is[e]}getWordIndex(e){return xf(this),is.indexOf(e)}},pl=new ll;xn.register(pl);var bi={en:pl};var bf="hdnode/5.7.0";var rs=new E(bf),Wx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Kx=ve("Bitcoin seed"),mr=2147483648;function Tf(n){return(1<=256)throw new Error("Depth too large!");return gf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(cr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~mr));let a=new Uint8Array(37);if(e&mr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(ca(Yn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Lo(F.from(r).add(this.privateKey).mod(Wx)):l=new mn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(cr,o,l,this.fingerprint,Lo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=mr)throw new Error("invalid path index - "+r);a=a._derive(mr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=mr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(ca(Yn.sha512,Kx,a));return new Ct(cr,Lo(i.slice(0,32)),null,"0x00000000",Lo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=yl(a),e=gi(hr(e,a),a),Ct._fromSeed(fl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&rs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(cr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(cr,W(o.slice(1)),null,i,s,r,a,null)}return rs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function fl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function hr(n,e){e=yl(e),rs.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=Tf(s);if((j(Yt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return W(a.slice(0,r/8))}function gi(n,e){if(e=yl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&Jx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return hr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=mr||n%1)&&rs.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var cl=new E(_f);function $x(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var kf=$x(),Uo=kf.crypto||kf.msCrypto;(!Uo||!Uo.getRandomValues)&&(cl.warn("WARNING: Missing strong random number source"),Uo={getRandomValues:function(n){return cl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&cl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Uo.getRandomValues(e),j(e)}function ss(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var xl=_n(hl());var Vo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function xr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Xn(16),N=new xa.default.Counter(R),q=new xa.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+xr(C.getUTCMonth()+1,2)+"-"+xr(C.getUTCDate(),2)+"T"+xr(C.getUTCHours(),2)+"-"+xr(C.getUTCMinutes(),2)+"-"+xr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(jo(n)){t&&t(0);let a=gl(n,e);return t&&t(1),Promise.resolve(a)}return Ho(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(jo(n))return gl(n,e);if(Ho(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},br=new E(Ff);function e5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function t5(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),e5(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&br.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),t5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&br.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&br.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&br.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new on(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&br.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(ts(t)));return ts(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return Ur(this._signingKey().signDigest(tr(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&br.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Ur(this._signingKey().signDigest(gt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),kl(this,e,t,a)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return ci(tr(n),e)}function Vf(n,e,t,a){return ci(gt.hash(n,e,t),a)}var ta={};qi(ta,{AlchemyProvider:()=>kr,AlchemyWebSocketProvider:()=>bs,AnkrProvider:()=>gs,BaseProvider:()=>ea,CloudflareProvider:()=>Ts,EtherscanProvider:()=>vs,FallbackProvider:()=>_s,Formatter:()=>X,InfuraProvider:()=>Er,InfuraWebSocketProvider:()=>As,IpcProvider:()=>Fl,JsonRpcBatchProvider:()=>iu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>wr,NodesmithProvider:()=>Es,PocketProvider:()=>Ms,Provider:()=>$t,Resolver:()=>vr,StaticJsonRpcProvider:()=>xs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Cs,WebSocketProvider:()=>Ta,getDefaultProvider:()=>ru,getNetwork:()=>us,isCommunityResourcable:()=>Ml,isCommunityResource:()=>ps,showThrottleMessage:()=>Zn});var jf="networks/5.7.1";var Hf=new E(jf);function n5(n){return n&&typeof n.renetwork=="function"}function ba(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return ba(t)},e}function zo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return zo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:zo("https://www.ethercluster.com/mordor","classicMordor")},Go={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ba("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ba("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ba("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ba("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:zo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zf,classicTestnet:zf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:zo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ba("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ba("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function us(n){if(n==null)return null;if(typeof n=="number"){for(let a in Go){let i=Go[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Go[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Go[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(n5(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Wf="web/5.7.1";var a5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return a5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var i5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ba(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function r5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Al(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+er(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Zi(_[3]):r5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.errors.SERVER_ERROR,{body:Ba(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.errors.TIMEOUT,{requestBody:Ba(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return i5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Ba(H,U.headers?U.headers["content-type"]:null),requestBody:Ba(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:_e(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=_e(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return Al(n,i,a)}function Rn(n,e){return e||(e={}),e=_e(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var Rl=_n(Xf());var Ae="providers/5.7.2";var ls=new E(Ae),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(f),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=_e(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():ls.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===lo?null:t}contractAddress(e){return li(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Un(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Nt(a)!==32?ls.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Po(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ls.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ls.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ls.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function Ml(n){return n&&typeof n.isCommunityResource=="function"}function ps(n){return Ml(n)&&n.isCommunityResource()}var Zf=!1;function Zn(){Zf||(Zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ae),f5=10;function ec(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function c5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function Tr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+tc(n);if(vo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function ys(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var m5=["block","network","pending","poll"],Pl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=c5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||m5.indexOf(this.tag)>=0}},h5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Cl(n){return me(F.from(n).toHexString(),32)}function ac(n){return fa.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $o(n,e){try{return Jt(fs(n,e))}catch{}return null}function fs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function Il(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function x5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Sa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",oc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=fs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?fs(a,0):null})}_getAddress(e,t){let a=h5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ac(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ac(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Rl.default.toWords(i.slice(2));return o.unshift(s),Rl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Yi?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",Cl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([Cl(64),Cl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},Sl=null,b5=1,ea=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Sl==null&&(Sl=new X),Sl}static getNetwork(e){return us(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ys()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ys(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=ys();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=b5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield nc(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ys();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=f5&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new vr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Sa(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=$o(yield this.call({to:a,data:"0x691f3431"+Sa(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new vr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=$o(yield this.call({to:s,data:"0x691f3431"+Sa(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new Pl(Tr(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=Tr(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=Tr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=Tr(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=Tr(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=Tr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(Ae),g5=["call","estimateGas"];function ms(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ms(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ms(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ms(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ms(e.body,!1);r==null&&(r=ms(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),g5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function uc(n){return new Promise(function(e){setTimeout(e,n)})}function T5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function cs(n){return n&&n.toLowerCase()}var Nl={},wr=class extends St{constructor(e,t,a){if(super(),e!==Nl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Dl(Nl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=_e(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=_e(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ga(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ga(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ga(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Dl=class extends wr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},v5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends ea{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(_e(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ga(this,void 0,void 0,function*(){yield uc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new wr(Nl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),T5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[cs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[cs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[cs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[cs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=cs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ga(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=_e(t),t.transaction=_e(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return uc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=_e(v5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Un(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var _r=null;try{if(_r=WebSocket,_r==null)throw new Error("inject please")}catch{let e=new E(Ae);_r=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ol=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Qo=new E(Ae),w5=1,Ta=class extends Xt{constructor(e,t){t==="any"&&Qo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new _r(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Qo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Qo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ol(this,void 0,void 0,function*(){return null})}set polling(e){!e||Qo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=w5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Ol(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Ol(this,void 0,void 0,function*(){this.websocket.readyState===_r.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var _5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hs=new E(Ae),xs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return _5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||hs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends xs{constructor(e,t){hs.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){hs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return hs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return hs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(Ae),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",bs=class extends Ta{constructor(e,t){let a=new kr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Yo}},kr=class extends It{static getWebSocketProvider(e,t){return new bs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&lc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var k5=new E(Ae),Xo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function A5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return k5.throwArgumentError("unsupported network","name",n)}var gs=class extends It{isCommunityResource(){return this.apiKey===Xo}static getApiKey(e){return e??Xo}static getUrl(e,t){t==null&&(t=Xo);let a={allowGzip:!0,url:"https://"+A5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Xo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var E5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(Ae),Ts=class extends It{static getApiKey(e){return e!=null&&pc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return E5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var Zo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Fa=new E(Ae);function yc(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Un(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function M5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function fc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function cc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Bl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Fa.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Fa.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Fa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Fa.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Fa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var vs=class extends ea{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Fa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return Zo(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?fc:M5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Zn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||fc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Zo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Zo(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Bl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=yc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Bl("call",r,t.transaction)}}case"estimateGas":{let i=yc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Bl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Fa.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Fa.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var nu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(Ae);function eu(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ar(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Ar(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Ar(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var C5=1;function xc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var I5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],S5=["address","args","errorArgs","errorSignature","method","transaction"];function tu(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function R5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function P5(n,e,t){let a=Ar;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return hc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=_e(i),i.confirmations=-1,Ar(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=_e(i),i.transactions=i.transactions.map(r=>(r=_e(r),r.confirmations=-1,r)),Ar(i))}:a=function(i){return i==null?null:Ar(i)};break;default:throw new Error("unknown method: "+e)}return R5(a,n.quorum)}function ws(n,e){return nu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function N5(n,e,t,a){return nu(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield ws(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var _s=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=ps(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=_e(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ps(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ti.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&Ti.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=mc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return nu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(e)})}perform(e,t){return nu(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=eu(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=N5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,eu()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:tu(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return I5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};S5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ti.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ti.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>tu(l)),provider:this})})}};var Fl=null;var au=new E(Ae),ks="84842078b09946638c03157f83405213",As=class extends Ta{constructor(e,t){let a=new Er(e,t),i=a.connection;i.password&&au.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===ks}},Er=class extends It{static getWebSocketProvider(e,t){return new As(e,t)}static getApiKey(e){let t={apiKey:ks,projectId:ks,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(au.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),au.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:au.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===ks&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ks}};var iu=class extends Xt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Ll=new E(Ae),D5="ETHERS_JS_SHARED",Es=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ll.throwArgumentError("invalid apiKey","apiKey",e),e||D5}static getUrl(e,t){Ll.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ll.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var bc=new E(Ae),gc="62e1ad51b37b8e00394bda3b",Ms=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:bc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===gc}};var Tc=new E(Ae),O5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:O5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function B5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var Cs=class extends Xt{constructor(e,t){e==null&&Tc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=B5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var wc=new E(Ae);function ru(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Xt(n);case"ws":case"wss":return new Ta(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=us(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:_s,AlchemyProvider:kr,AnkrProvider:gs,CloudflareProvider:Ts,EtherscanProvider:vs,InfuraProvider:Er,JsonRpcProvider:Xt,NodesmithProvider:Es,PocketProvider:Ms,Web3Provider:Cs,IpcProvider:null},e)}var te={};qi(te,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Ra,LogDescription:()=>nr,Logger:()=>E,ParamType:()=>yt,RLP:()=>to,SigningKey:()=>mn,SupportedAlgorithm:()=>Yn,TransactionDescription:()=>ar,TransactionTypes:()=>Ro,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>mo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>gt,_fetchData:()=>Al,_toEscapedUtf8String:()=>Sd,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Bd,checkProperties:()=>Wi,checkResultErrors:()=>Ji,commify:()=>Sc,computeAddress:()=>hn,computeHmac:()=>ca,computePublicKey:()=>es,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>$r,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Sn,formatBytes32String:()=>Rd,formatEther:()=>Rc,formatUnits:()=>Ul,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>Tl,getStatic:()=>ht,hashMessage:()=>tr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>gd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ny,isBytes:()=>un,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Ld,joinSignature:()=>Ur,keccak256:()=>fe,mnemonicToEntropy:()=>hr,mnemonicToSeed:()=>fl,namehash:()=>Sa,nameprep:()=>Od,parseBytes32String:()=>Pd,parseEther:()=>Pc,parseTransaction:()=>Po,parseUnits:()=>Vl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>ci,recoverPublicKey:()=>So,resolveProperties:()=>Ie,ripemd160:()=>as,serializeTransaction:()=>ts,sha256:()=>Yt,sha512:()=>dl,shallowCopy:()=>_e,shuffled:()=>ss,solidityKeccak256:()=>Ac,solidityPack:()=>su,soliditySha256:()=>Ec,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ia,toUtf8String:()=>Jt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>si});var _c="solidity/5.7.0";var F5=new RegExp("^bytes([0-9]+)$"),L5=new RegExp("^(u?int)([0-9]*)$"),U5=new RegExp("^(.*)\\[([0-9]*)\\]$"),V5="0000000000000000000000000000000000000000000000000000000000000000",Mr=new E(_c);function kc(n,e,t){switch(n){case"address":return t?si(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?si(e,32):j(e)}let a=n.match(L5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(F5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+V5).substring(0,66)):e}if(a=n.match(U5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",n)}function su(n,e){n.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(su(n,e))}function Ec(n,e){return Yt(su(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Ul(n,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return zi(n,e??18)}function Vl(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function Rc(n){return Ul(n,18)}function Pc(n){return Vl(n,18)}var ou="ethers/5.7.2";var Nc=new E(ou);try{let n=window;n._ethers==null&&(n._ethers=jl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var uu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(uu||(uu={}));var Cr;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Cr||(Cr={}));var du;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(du||(du={}));var Hl;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Hl||(Hl={}));var Is;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Is||(Is={}));var Ss;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ss||(Ss={}));var ql;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(ql||(ql={}));var ke;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ke||(ke={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var zl="0x12345678",Gl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Gl||(Gl={}));var Ne;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(Ne||(Ne={}));var we;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(we||(we={}));var Wl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],vi=class{static createInterface(){return new te.Interface(Wl)}static connect(e,t){return new oe(e,Wl,t)}};xe(vi,"abi",Wl);var Kl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};xe(wi,"abi",Kl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},Jl=n=>n!=null;var{keccak256:H5,toUtf8Bytes:q5}=te,{MaxUint256:G5}=xt;var Ir=n=>te.formatEther(n),lu=n=>te.parseEther(n),pu=n=>lu(n[0]),$l=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(Ne.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Jl)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return G5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},La=n=>H5(q5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Ql=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Jl);var{hexDataSlice:Yl}=te,{MaxUint256:z5}=xt,Bc=n=>{let e=Yl(n,0,3),t=F.from(Yl(n,4,35)),a=F.from(Yl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),z5,r];let o=F.from(ke.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await _i(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},W5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):W5(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:K5}=xt;async function J5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Rs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=vi.connect(r,a.signer||a.provider),_=await J5(I,p);if(_.includes(Ne.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${ke.RootDomain}`);o=Lc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Lc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,K5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:$5}=xt,aa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Cr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await aa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await aa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${$5}/noProof`,s=await aa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Ck=Et(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,Rk=Et(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Dk=Et(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Fk=Et(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,Vk=Et(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,qk=Et(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,Wk=Et(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,$k=Et(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,Xk=Et(dm),Xl={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Zl=dm-1;var lm=18,Q5=Et(lm),tA=lm-1;var Y5=(n,e)=>{switch(n){case we.FundingQueue:return Vc[e];case we.IVotingReputation:return Xl[e];case we.MultisigPermissions:return qc[e];case we.OneTxPayment:return Wc[e];case we.ReputationBootstrapper:return $c[e];case we.StagedExpenditure:return tm[e];case we.StakedExpenditure:return Xc[e];case we.StreamingPayments:return im[e];case we.TokenSupplier:return om[e];case we.VotingReputation:return Xl[e];default:return Oc(n,"Could not find extension with name")}},va=(n,e,t)=>{let a=Y5(n,e);return!!a&&!a.includes(t)};var fu={[we.FundingQueue]:jc,[we.IVotingReputation]:Zl,[we.MultisigPermissions]:Gc,[we.OneTxPayment]:Kc,[we.ReputationBootstrapper]:Qc,[we.StagedExpenditure]:nm,[we.StakedExpenditure]:Zc,[we.StreamingPayments]:rm,[we.TokenSupplier]:um,[we.VotingReputation]:Zl};var P6=_n(pm(),1);var vp=_n(I6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var Tp=2,gp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(gp||(gp={}));var S6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,l1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),wp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==Tp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Re.Colony?l1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:Tp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.data};var _p=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},kp=_p;var Ap=(0,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Us={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Or=class{adapter;constructor(e){this.adapter=e||new kp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ap(a)).json();return wp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ap(a)).json(),s=Object.entries(Us).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return wp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await Ap(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var AE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(wn,"abi",Mp);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ii,"abi",Cp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],N6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",c1=n=>n.length>1,Nn=class extends hi{constructor(...e){c1(e)?super(...e):super(Ku,N6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Nn,"bytecode",N6),xe(Nn,"abi",Ku);var Ip=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Si,"abi",Ip);var Ri;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Ri||(Ri={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:b1}=xt;async function g1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var T1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await g1(t)}catch{a=!1}try{await t.nonces(b1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Ri.TokenClient,t},Sp=T1;var v1=(n,e)=>{let t=Si.connect(n,e);return t.clientType=Ri.TokenLockingClient,t},Rp=v1;var{AddressZero:Pp}=xt,w1=vn.connect(Pp,new ta.BaseProvider(3656691)).interface,_1=Ii.connect(Pp,new ta.BaseProvider(3656691)).interface,k1=wn.connect(Pp,new ta.BaseProvider(3656691)).interface;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Vs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],js=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};js.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Pi.abi=Op;var wa=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ql(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:E1,solidityKeccak256:M1,splitSignature:C1}=te,ja=class extends wa{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=M1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=E1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=C1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ni.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Di.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Oi.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Bi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Fi.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Li.abi=jp;var{AddressZero:O1}=xt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(On.extensionType),e.address);if(t===O1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding]);return[_,v,S,L,f,I,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ha=On;Ha.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Ha.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var qs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var D6=async(n,e)=>{let t=await Sp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Hs(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new qs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Ui.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Vi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};ji.abi=Gp;var{AddressZero:zp}=xt;var $u=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(Fn.extensionType),e.address);if(t===zp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,zl);return[e,t,zp,zl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ir(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Ne.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},qa=Fn;qa.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],qa.extensionType=we.VotingReputation;var U1={["motion"]:qa,["oneTx"]:Ha},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await qa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Ne.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ke.RootDomain,s=a||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Ne.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=U1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!va(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[La(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:Ne.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:V1}=te,Qu=class extends wa{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=V1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Gs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Rp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var zs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||du[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Cr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Wp}=xt,Ws=class{constructor(e,t){this.config=new zs(e,t),this.contract=Pi.connect(t?.customNetworkAddress||uu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new ja({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Is[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var B6=async n=>{if(!n.ext.oneTx){if(!va(we.OneTxPayment,fu[we.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${fu[we.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Ne.Administration,Ne.Funding]).tx().mined()}};var{isAddress:H1}=te,Yu=new ta.JsonRpcProvider("http://127.0.0.1:8545"),Hi,Ks,q1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Yu),G1=async n=>{let e=q1(),a=await new Ws(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await B6(a),a},z1=async n=>{await Hi.mint(lu(n)).tx().mined(),await Hi.claimFunds().tx().mined();let e=await Hi.getBalance();return Ir(e)},W1=async n=>{if(!Hi.ext.oneTx)throw new Error("OneTxPayment extension not installed");return Hi.ext.oneTx.pay(n,pu`10`).tx()},K1=async()=>{await Yu.send("evm_increaseTime",[3600]),await Yu.send("evm_mine",[]),await Yu.send("evm_mine",[])},J1=async n=>(await Hi.getReputation(n)).toString(),Xu=document.querySelector("#address"),F6=document.querySelector("#button_connect"),Kp=document.querySelector("#funding_amount"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),j6=document.querySelector("#button_jump"),H6=document.querySelector("#button_get_reputation"),Jp=document.querySelector("#error"),q6=document.querySelector("#result");if(!Xu||!Kp||!U6||!Jp||!q6||!F6||!L6||!V6||!j6||!H6)throw new Error("Could not find all required HTML elements");var Zu=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},G6=()=>{Jp.innerText=""},Ln=n=>{q6.innerText=n};F6.addEventListener("click",async()=>{G6();let n=Xu.value;if(!H1(n))return Zu(new Error("This is not a valid address"));Ln("Processing...");try{let e=await G1(Xu.value);Hi=e,Ln(` +`)}`,l1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),wp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==Tp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Re.Colony?l1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=vp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:Tp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.data};var _p=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},kp=_p;var Ap=(0,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Us={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Or=class{adapter;constructor(e){this.adapter=e||new kp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ap(a)).json();return wp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ap(a)).json(),s=Object.entries(Us).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return wp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await Ap(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var AE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],vn=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(vn,"abi",Ep);var Mp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],wn=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(wn,"abi",Mp);var Cp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new te.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ii,"abi",Cp);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],N6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",c1=n=>n.length>1,Nn=class extends hi{constructor(...e){c1(e)?super(...e):super(Ku,N6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Nn,"bytecode",N6),xe(Nn,"abi",Ku);var Ip=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Si=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Si,"abi",Ip);var Ri;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Ri||(Ri={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:b1}=xt;async function g1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var T1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await g1(t)}catch{a=!1}try{await t.nonces(b1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Ri.TokenClient,t},Sp=T1;var v1=(n,e)=>{let t=Si.connect(n,e);return t.clientType=Ri.TokenLockingClient,t},Rp=v1;var{AddressZero:Pp}=xt,w1=vn.connect(Pp,new ta.BaseProvider(3656691)).interface,_1=Ii.connect(Pp,new ta.BaseProvider(3656691)).interface,k1=wn.connect(Pp,new ta.BaseProvider(3656691)).interface;var Np=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Vs.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],js=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};js.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Pi.abi=Op;var wa=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ql(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:E1,solidityKeccak256:M1,splitSignature:C1}=te,ja=class extends wa{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=M1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=E1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=C1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=ke.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ni.abi=Bp;var Fp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Di.abi=Fp;var Lp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Oi=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};Oi.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Bi.abi=Up;var Vp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};Fi.abi=Vp;var jp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Li.abi=jp;var{AddressZero:O1}=xt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(On.extensionType),e.address);if(t===O1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||ke.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding],this.oneTxPaymentContract.address),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Ne.Administration,Ne.Funding]);return[_,v,S,L,f,I,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ha=On;Ha.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Ha.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var qs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var D6=async(n,e)=>{let t=await Sp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Hs(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new qs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Ui.abi=Hp;var qp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Vi.abi=qp;var Gp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};ji.abi=Gp;var{AddressZero:zp}=xt;var $u=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(Fn.extensionType),e.address);if(t===zp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,zl);return[e,t,zp,zl,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=ke.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ir(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await na(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,Ne.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},qa=Fn;qa.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],qa.extensionType=we.VotingReputation;var U1={["motion"]:qa,["oneTx"]:Ha},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await qa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ha.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ke.RootDomain],{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[ke.RootDomain,t]},{roles:Ne.Architecture,domain:ke.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:Ne.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ke.RootDomain,s=a||ke.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await na(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Ne.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await _i(x,this.colony,r,s),_=await _i(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ke.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=U1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!va(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[La(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ke.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:Ne.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:V1}=te,Qu=class extends wa{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=V1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Gs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Rp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var zs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||du[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Cr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Wp}=xt,Ws=class{constructor(e,t){this.config=new zs(e,t),this.contract=Pi.connect(t?.customNetworkAddress||uu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new ja({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Is[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var B6=async n=>{if(!n.ext.oneTx){if(!va(we.OneTxPayment,fu[we.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${fu[we.OneTxPayment]} is not compatible with the installed Colony version ${n.version}`);if(await n.installExtension("oneTx").tx().mined(),await n.updateExtensions(),!n.ext.oneTx)throw new Error("OneTxPayment extension could not be installed");let e=n.ext.oneTx;await n.setRoles(e.address,[Ne.Administration,Ne.Funding]).tx().mined()}};var{isAddress:H1}=te,Yu=new ta.JsonRpcProvider("http://127.0.0.1:8545"),Hi,Ks,q1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Yu),G1=async n=>{let e=q1(),a=await new Ws(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await B6(a),a},z1=async n=>{await Hi.mint(lu(n)).tx().mined(),await Hi.claimFunds().tx().mined();let e=await Hi.getBalance();return Ir(e)},W1=async n=>{if(!Hi.ext.oneTx)throw new Error("OneTxPayment extension not installed");return Hi.ext.oneTx.pay(n,pu`10`).tx()},K1=async()=>{await Yu.send("evm_increaseTime",[3600]),await Yu.send("evm_mine",[]),await Yu.send("evm_mine",[])},J1=async n=>(await Hi.getReputation(n)).toString(),Xu=document.querySelector("#address"),F6=document.querySelector("#button_connect"),Kp=document.querySelector("#funding_amount"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),j6=document.querySelector("#button_jump"),H6=document.querySelector("#button_get_reputation"),Jp=document.querySelector("#error"),q6=document.querySelector("#result");if(!Xu||!Kp||!U6||!Jp||!q6||!F6||!L6||!V6||!j6||!H6)throw new Error("Could not find all required HTML elements");var Zu=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},G6=()=>{Jp.innerText=""},Ln=n=>{q6.innerText=n};F6.addEventListener("click",async()=>{G6();let n=Xu.value;if(!H1(n))return Zu(new Error("This is not a valid address"));Ln("Processing...");try{let e=await G1(Xu.value);Hi=e,Ln(` Connected to Colony with address: ${e.address}. Colony version: ${e.version}. `)}catch(e){Zu(e),Ln("")}finally{Xu.value=""}return null});L6.addEventListener("click",async()=>{G6(),Ln("Processing...");try{let n=Kp.value,e=await z1(n);Ln(`Funded MetaColony! Current funding: ${e} CLNY`)}catch(n){Zu(n),Ln("")}finally{Kp.value=""}return null});V6.addEventListener("click",async()=>{Ks=U6.value,Ln("Processing...");try{await W1(Ks)}catch(n){Zu(n),Ln("")}Ln(`Successfully paid 10 CLNY to ${Ks}`)});j6.addEventListener("click",async()=>{await K1(),Ln("Whooo that was a hell of a ride. Welcome to the future")});H6.addEventListener("click",async()=>{let n=await J1(Ks);Ln(`User ${Ks} has ${Ir(n)} reputation points`)});})(); diff --git a/metamask.js b/metamask.js index abffdd1e7..856c3f37a 100644 --- a/metamask.js +++ b/metamask.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Ix)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Sx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function uf(n){if(ts==null&&(ts=Sx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var el=class extends hn{constructor(){super("en")}getWord(e){return uf(this),ts[e]}getWordIndex(e){return uf(this),ts.indexOf(e)}},tl=new el;hn.register(tl);var hi={en:tl};var df="hdnode/5.7.0";var ns=new E(df),Rx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Px=ve("Bitcoin seed"),fr=2147483648;function pf(n){return(1<=256)throw new Error("Depth too large!");return lf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,me(K(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ct(yr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~fr));let a=new Uint8Array(37);if(e&fr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Rx)):l=new cn(K(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new Ct(yr,o,l,this.fingerprint,Do(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(fa(Qn.sha512,Px,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=nl(a),e=xi(cr(e,a),a),Ct._fromSeed(al(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||lf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),o=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ct(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=nl(e),ns.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=pf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=nl(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&Nx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&pf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function yf(n,e){try{return cr(n,e),!0}catch{}return!1}function ff(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var cf="random/5.7.0";var il=new E(cf);function Dx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var mf=Dx(),Oo=mf.crypto||mf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return il.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&il.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var ol=wn(sl());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:xf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Xn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:K(R).substring(2),mnemonicCiphertext:K(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(n,e,t){if(Fo(n)){t&&t(0);let a=dl(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Af(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Mf(n,e){if(Fo(n))return dl(n,e);if(Lo(n))return kf(n,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var If=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(Cf);function Ux(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Vx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Ux(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Vx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&hr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&hr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Cn(this,e)}signTransaction(e){return Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&hr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,a)})}signMessage(e){return If(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return If(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Br(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,a)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Ef(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Mf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Sf(n,e){return yi(Zi(n),e)}function Rf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>Y,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Ml,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>xl,isCommunityResource:()=>us,showThrottleMessage:()=>Yn});var Pf="networks/5.7.1";var Nf=new E(Pf);function jx(n){return n&&typeof n.renetwork=="function"}function xa(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},t}var Df={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Of={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Bf={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Df,mainnet:Df,morden:{chainId:2,name:"morden"},ropsten:Of,testnet:Of,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:xa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:xa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:xa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:xa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Bf,classicTestnet:Bf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:xa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:xa("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Nf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Nf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(jx(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Ff="web/5.7.1";var Hx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Lf(n,e){return Hx(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var qx=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Ff);function Uf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function Gx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;In.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Yi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):Gx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.errors.SERVER_ERROR,{body:Da(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.errors.TIMEOUT,{requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return qx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Da(H,U.headers?U.headers["content-type"]:null),requestBody:Da(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ml(n,i,a)}function Rn(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var vl=wn(qf());var ke="providers/5.7.2";var os=new E(ke),Y=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:Y.allowNull(this.accessList.bind(this),null),blockHash:Y.allowNull(s,null),blockNumber:Y.allowNull(l,null),transactionIndex:Y.allowNull(l,null),confirmations:Y.allowNull(l,null),from:t,gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,nonce:l,data:r,r:Y.allowNull(this.uint256),s:Y.allowNull(this.uint256),v:Y.allowNull(l),creates:Y.allowNull(t,null),raw:Y.allowNull(r)},e.transactionRequest={from:Y.allowNull(t),nonce:Y.allowNull(l),gasLimit:Y.allowNull(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),data:Y.allowNull(f),type:Y.allowNull(l),accessList:Y.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:Y.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:Y.allowNull(this.address,null),from:Y.allowNull(this.address,null),contractAddress:Y.allowNull(t,null),transactionIndex:l,root:Y.allowNull(o),gasUsed:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),status:Y.allowNull(l),type:p},e.block={hash:Y.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:Y.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=Y.allowNull(Y.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Y.allowNull(i,void 0),toBlock:Y.allowNull(i,void 0),blockHash:Y.allowNull(s,void 0),address:Y.allowNull(t,void 0),topics:Y.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Y.allowNull(l),blockHash:Y.allowNull(s),transactionIndex:l,removed:Y.allowNull(this.boolean.bind(this)),address:t,data:Y.allowFalsish(r,"0x"),topics:Y.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return sn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():os.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===ro?null:t}contractAddress(e){return ui(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Ln(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Nt(a)!==32?os.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Y.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=Y.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Co(e)}receiptLog(e){return Y.check(this.formats.receiptLog,e)}receipt(e){let t=Y.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):os.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&os.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return Y.check(this.formats.filter,e)}filterLog(e){return Y.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function xl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return xl(n)&&n.isCommunityResource()}var Gf=!1;function Yn(){Gf||(Gf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Yx=10;function zf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[zf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return zf(e)}).join("&")}function Zx(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Wf(n){return new Promise(e=>{setTimeout(e,n)})}var e5=["block","network","pending","poll"],wl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=Zx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||e5.indexOf(this.tag)>=0}},t5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bl(n){return me(F.from(n).toHexString(),32)}function Jf(n){return ya.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),$f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function gl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Qf(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function n5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Yf(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Yf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=t5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Jf(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return Jf(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=vl.default.toWords(i.slice(2));return o.unshift(s),vl.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===$i?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",bl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;a<$f.length;a++){let i=t.match($f[a]);if(i==null)continue;let r=i[1].toLowerCase();switch(r){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:gl(t)};case"erc721":case"erc1155":{let s=r==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:r,content:t});let o=this._resolvedAddress||(yield this.getAddress()),l=(i[2]||"").split("/");if(l.length!==2)return null;let p=yield this.provider.formatter.address(l[0]),f=me(F.from(l[1]).toHexString(),32);if(r==="erc721"){let S=this.provider.formatter.callAddress(yield this.provider.call({to:p,data:_t(["0x6352211e",f])}));if(o!==S)return null;e.push({type:"owner",content:S})}else if(r==="erc1155"){let S=F.from(yield this.provider.call({to:p,data:_t(["0x00fdd58e",me(o,32),f])}));if(S.isZero())return null;e.push({type:"balance",content:S.toString()})}let x={to:this.provider.formatter.address(l[0]),data:_t([s,f])},I=zo(yield this.provider.call(x),0);if(I==null)return null;e.push({type:"metadata-url-base",content:I}),r==="erc1155"&&(I=I.replace("{id}",f.substring(2)),e.push({type:"metadata-url-expanded",content:I})),I.match(/^ipfs:/i)&&(I=gl(I)),e.push({type:"metadata-url",content:I});let _=yield Sn(I);if(!_)return null;e.push({type:"metadata",content:JSON.stringify(_)});let v=_.image;if(typeof v!="string")return null;if(!v.match(/^(https:\/\/|data:)/i)){if(v.match(Xf)==null)return null;e.push({type:"url-ipfs",content:v}),v=gl(v)}return e.push({type:"url",content:v}),{linkage:e,url:v}}}}}catch{}return null})}getContentHash(){return ue(this,void 0,void 0,function*(){let e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;let t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let s=parseInt(t[3],16);if(t[4].length===s*2)return"ipfs://"+ya.encode("0x"+t[1])}let a=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){let s=parseInt(a[3],16);if(a[4].length===s*2)return"ipns://"+ya.encode("0x"+a[1])}let i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i&&i[1].length===32*2)return"bzz://"+i[1];let r=e.match(/^0x90b2c605([0-9a-f]*)$/);if(r&&r[1].length===34*2){let s={"=":"","+":"-","/":"_"},o=Yi("0x"+r[1]).replace(/[=+\/]/g,l=>s[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([bl(64),bl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},Tl=null,a5=1,Zn=class extends $t{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=mt(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Tl==null&&(Tl=new Y),Tl}static getNetwork(e){return rs(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=ds();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=a5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Wf(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=ds();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Wf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Nt(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>K(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?K(r):null))}),this.formatter.transactionRequest(yield Ie(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Yx&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Nt(r)%32===4)try{let s=Ce(r,4),o=Ce(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ce(s,32,64)).toNumber(),f=F.from(Ce(s,p,p+32)).toNumber(),x=Ce(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ca(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,data:"0x691f3431"+Ca(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new gr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=zo(yield this.call({to:s,data:"0x691f3431"+Ca(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new wl(br(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=br(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=br(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),i5=["call","estimateGas"];function ys(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function ec(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),i5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Zf(n){return new Promise(function(e){setTimeout(e,n)})}function r5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function ps(n){return n&&n.toLowerCase()}var _l={},Tr=class extends St{constructor(e,t,a){if(super(),e!==_l)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kl(_l,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&At.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),ec("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ba(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return ba(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},kl=class extends Tr{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},s5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Yt=class extends Zn{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ba(this,void 0,void 0,function*(){yield Zf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=mt(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(_l,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),r5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ps(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ps(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ps(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ps(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ps(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return ba(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return ec(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return Zf(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(s5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Ln(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=K(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ko=new E(ke),o5=1,ga=class extends Yt{constructor(e,t){t==="any"&&Ko.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new vr(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Ko.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Ko.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Al(this,void 0,void 0,function*(){return null})}set polling(e){!e||Ko.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=o5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Al(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Al(this,void 0,void 0,function*(){this.websocket.readyState===vr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var u5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return u5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||fs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var tc=new E(ke),Wo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Wo}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Wo:(e&&typeof e!="string"&&tc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:tc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Wo&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Wo}};var d5=new E(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function l5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return d5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+l5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var p5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},nc=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&nc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:nc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return p5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var $o=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new E(ke);function ac(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function y5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function ic(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function rc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function El(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Oa.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Oa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Oa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var bs=class extends Zn{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Oa.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return $o(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?ic:y5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&Yn(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Sn(o,l,s||ic);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return $o(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return $o(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>El("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=ac(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("call",r,t.transaction)}}case"estimateGas":{let i=ac(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=rc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=rc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Oa.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Oa.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var Yo=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Qo(){return new Date().getTime()}function sc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>_r(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var f5=1;function uc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var c5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],m5=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function h5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function x5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=oc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return oc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return h5(a,n.quorum)}function gs(n,e){return Yo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function b5(n,e,t,a){return Yo(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=us(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=us(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&bi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=sc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return sc(e)})}perform(e,t){return Yo(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=b5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Xo(_,null),request:{method:e,params:ct(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield uc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return c5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};m5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),bi.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),bi.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Xo(l)),provider:this})})}};var Ml=null;var Zo=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&Zo.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){let t={apiKey:vs,projectId:vs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Zo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Zo.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Zo.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var eu=class extends Yt{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:ct(o),provider:this}),Sn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Cl=new E(ke),g5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cl.throwArgumentError("invalid apiKey","apiKey",e),e||g5}static getUrl(e,t){Cl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Cl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var dc=new E(ke),lc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=lc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:dc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:dc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===lc}};var pc=new E(ke),T5=1;function yc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:T5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:ct(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function v5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var As=class extends Yt{constructor(e,t){e==null&&pc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=v5(e)):e.sendAsync?i=yc(e,e.sendAsync.bind(e)):e.send?i=yc(e,e.send.bind(e)):pc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var fc=new E(ke);function tu(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new Yt(n);case"ws":case"wss":return new ga(n);default:fc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&fc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Yt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ae={};ji(ae,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>Xs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Mo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Ed,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>vc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>vd,formatEther:()=>wc,formatUnits:()=>Il,getAccountPath:()=>ff,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ey,getIcapAddress:()=>Ay,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>ky,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>yf,isValidName:()=>Cd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>al,namehash:()=>Ca,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>_c,parseTransaction:()=>Co,parseUnits:()=>Sl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Eo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>Zd,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>hc,solidityPack:()=>nu,soliditySha256:()=>xc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Sf,verifyTypedData:()=>Rf,zeroPad:()=>ii});var cc="solidity/5.7.0";var w5=new RegExp("^bytes([0-9]+)$"),_5=new RegExp("^(u?int)([0-9]*)$"),k5=new RegExp("^(.*)\\[([0-9]*)\\]$"),A5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(cc);function mc(n,e,t){switch(n){case"address":return t?ii(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?ii(e,32):j(e)}let a=n.match(_5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(w5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+A5).substring(0,66)):e}if(a=n.match(k5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(mc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(mc(a,e[i]))}),K(ye(t))}function hc(n,e){return fe(nu(n,e))}function xc(n,e){return Xt(nu(n,e))}var bc="units/5.7.0";var gc=new E(bc),Tc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function vc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&gc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Il(n,e){if(typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Sl(n,e){if(typeof n!="string"&&gc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function wc(n){return Il(n,18)}function _c(n){return Sl(n,18)}var au="ethers/5.7.2";var kc=new E(au);try{let n=window;n._ethers==null&&(n._ethers=Rl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ac;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ac||(Ac={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Er;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Er||(Er={}));var ru;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Pl;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Pl||(Pl={}));var Es;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Es||(Es={}));var Ms;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ms||(Ms={}));var Nl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Nl||(Nl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(zt||(zt={}));var Ol="0x12345678",Dl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Dl||(Dl={}));var vt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Bl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],gi=class{static createInterface(){return new ae.Interface(Bl)}static connect(e,t){return new oe(e,Bl,t)}};xe(gi,"abi",Bl);var Fl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ae.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Ec=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:M5,toUtf8Bytes:C5}=ae,{MaxUint256:I5}=ht;var Ul=n=>ae.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return I5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},Ba=n=>M5(C5(n));var Mr=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ae,{MaxUint256:S5}=ht,Mc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Cc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),S5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await vi(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},R5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Cc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):R5(n,e,t,a,i):Cc(n,e,t,a,i);var{MaxUint256:Ic}=ht,{AddressZero:P5}=ht;async function N5(n,e){let t;try{return t=await n.getCapabilityRoles(ae.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Mc(s),I=gi.connect(r,a.signer||a.provider),_=await N5(I,p);if(_.includes(vt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Ic}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Ic;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,P5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:D5}=ht,na=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Er[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await na.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await na.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${D5}/noProof`,s=await na.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Sc=10,lk=Et(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=3,fk=Et(Nc),Dc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Oc=Nc-1;var Bc=10,hk=Et(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Lc=Bc-1;var Uc=7,gk=Et(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=8,wk=Et(Hc),qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Gc=Hc-1;var zc=5,Ak=Et(zc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Wc=zc-1;var Jc=7,Ck=Et(Jc),$c={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Qc=Jc-1;var Xc=10,Rk=Et(Xc),Yc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Zc=Xc-1;var em=14,Dk=Et(em),ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=em-1;var tm=18,O5=Et(tm),Fk=tm-1;var B5=(n,e)=>{switch(n){case Ae.FundingQueue:return Rc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Dc[e];case Ae.OneTxPayment:return Fc[e];case Ae.ReputationBootstrapper:return Vc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return qc[e];case Ae.StreamingPayments:return $c[e];case Ae.TokenSupplier:return Yc[e];case Ae.VotingReputation:return ql[e];default:return Ec(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=B5(n,e);return!!a&&!a.includes(t)};var F5={[Ae.FundingQueue]:Pc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Oc,[Ae.OneTxPayment]:Lc,[Ae.ReputationBootstrapper]:jc,[Ae.StagedExpenditure]:Wc,[Ae.StakedExpenditure]:Gc,[Ae.StreamingPayments]:Qc,[Ae.TokenSupplier]:Zc,[Ae.VotingReputation]:Gl};var _6=wn(nm(),1);var yp=wn(T6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(lp||(lp={}));var v6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Qb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=v6(t.errors);throw new Error(a)};var w6=(n,e)=>{let t=n===Re.Colony?Qb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=v6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,_6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=w6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var oE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ae.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ae.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ae.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],k6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",e1=n=>n.length>1,Nn=class extends ci{constructor(...e){e1(e)?super(...e):super(Vu,k6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ae.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",k6),xe(Nn,"abi",Vu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ae.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:i1}=ht;async function r1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var s1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await r1(t)}catch{a=!1}try{await t.nonces(i1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=s1;var o1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=o1;var{AddressZero:_p}=ht,u1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,d1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,l1=vn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ae.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ae.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ae.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:y1,solidityKeccak256:f1,splitSignature:c1}=ae,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=f1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=y1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=c1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ae.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ae.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ae.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ae.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ae.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ae.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:v1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===v1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ae.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ae.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ae.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ae.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ae.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var A1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=A1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:E1}=ae,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=E1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:E6}=ae,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getColonyAddress(e){let t=E6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getUserAddress(e){let t=E6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var M6=new ea.Web3Provider(window.ethereum),M1=async n=>new qs(n).getMetaColony(),C1=async()=>(await M6.send("eth_requestAccounts",[]),M6.getSigner()),C6=document.querySelector("#button"),Up=document.querySelector("#error"),I6=document.querySelector("#result");if(!C6||!Up||!I6)throw new Error("Could not find all required HTML elements");var I1=n=>{Up.innerText=n},S1=()=>{Up.innerText=""},Lp=n=>{I6.innerText=n};C6.addEventListener("click",async()=>{S1(),Lp("Thinking...");try{let n=await C1(),e=await M1(n);Lp(`Connected to metaColonyClient with version ${e.version}`)}catch(n){I1(`Found an error: ${n.message}`),Lp("")}});})(); +`)}`,Qb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==pp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Re.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=v6(t.errors);throw new Error(a)};var w6=(n,e)=>{let t=n===Re.Colony?Qb(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:pp});if(!a.success){let i=v6(a.errors);throw new Error(i)}return a.data};var cp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},mp=cp;var hp=(0,_6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Bs={[Re.Annotation]:"Annotation(address,bytes32,string)",[Re.Colony]:"ColonyMetadata(address,string)",[Re.Decision]:"Annotation(address,bytes32,string)",[Re.Domain]:"DomainMetadata(address,uint256,string)",[Re.Misc]:"",[Re.DEFAULT]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return fp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await hp(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=w6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var oE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var xp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Tn=class{static createInterface(){return new ae.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Tn,"abi",xp);var bp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],vn=class{static createInterface(){return new ae.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(vn,"abi",bp);var gp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ci=class{static createInterface(){return new ae.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var Vu=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],k6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",e1=n=>n.length>1,Nn=class extends ci{constructor(...e){e1(e)?super(...e):super(Vu,k6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new ae.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",k6),xe(Nn,"abi",Vu);var Tp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Ii=class{static createInterface(){return new ae.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:i1}=ht;async function r1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var s1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await r1(t)}catch{a=!1}try{await t.nonces(i1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=s1;var o1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=o1;var{AddressZero:_p}=ht,u1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,d1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,l1=vn.connect(_p,new ea.BaseProvider(3656691)).interface;var kp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ae.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],Ls=class{static createInterface(){return new ae.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Ls.abi=Ap;var Ep=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ae.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:y1,solidityKeccak256:f1,splitSignature:c1}=ae,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=f1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=y1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=c1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var te=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Mp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Pi=class{static createInterface(){return new ae.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;var Cp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ni=class{static createInterface(){return new ae.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.abi=Cp;var Ip=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Di=class{static createInterface(){return new ae.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi=class{static createInterface(){return new ae.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Oi.abi=Sp;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new ae.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var Pp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new ae.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:v1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===v1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding],this.oneTxPaymentContract.address),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...te("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Li=class{static createInterface(){return new ae.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.abi=Np;var Dp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Ui=class{static createInterface(){return new ae.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new ae.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var Hu=F.from(10).pow(18),Fn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Fn.extensionType),e.address);if(t===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return ae.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...te("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==zt.Staking)throw new Error(`Motion cannot be staked. It's currently in "${zt[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ta(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,vt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ae.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==zt.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${zt[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var A1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Va.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Bn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Colony,e),[t]},async t=>({...te("ColonyMetadata",t)}),{metadataType:Re.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainMetadata",t)}),{metadataType:Re.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:vt.Architecture,domain:e},async a=>({...te("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ta(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,vt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await vi(x,this.colony,r,s),_=await vi(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...te("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=A1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...te("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...te("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...te("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:E1}=ae,qu=class extends Ta{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=E1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:E6}=ae,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getColonyAddress(e){let t=E6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getUserAddress(e){let t=E6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var M6=new ea.Web3Provider(window.ethereum),M1=async n=>new qs(n).getMetaColony(),C1=async()=>(await M6.send("eth_requestAccounts",[]),M6.getSigner()),C6=document.querySelector("#button"),Up=document.querySelector("#error"),I6=document.querySelector("#result");if(!C6||!Up||!I6)throw new Error("Could not find all required HTML elements");var I1=n=>{Up.innerText=n},S1=()=>{Up.innerText=""},Lp=n=>{I6.innerText=n};C6.addEventListener("click",async()=>{S1(),Lp("Thinking...");try{let n=await C1(),e=await M1(n);Lp(`Connected to metaColonyClient with version ${e.version}`)}catch(n){I1(`Found an error: ${n.message}`),Lp("")}});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/motions.js b/motions.js index f7741614f..925a2b76f 100644 --- a/motions.js +++ b/motions.js @@ -3,7 +3,7 @@ `)+` `)}static register(e,t){if(t||(t=e.locale),Xx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Zx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",us=null;function xf(n){if(us==null&&(us=Zx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Tn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw us=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ul=class extends Tn{constructor(){super("en")}getWord(e){return xf(this),us[e]}getWordIndex(e){return xf(this),us.indexOf(e)}},dl=new ul;Tn.register(dl);var vi={en:dl};var bf="hdnode/5.7.0";var ds=new E(bf),e5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t5=ve("Bitcoin seed"),br=2147483648;function Tf(n){return(1<=256)throw new Error("Depth too large!");return gf(ye([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",W(this.depth),this.parentFingerprint,me(W(this.index),4),this.chainCode,this.privateKey!=null?ye(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(xr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~br));let a=new Uint8Array(37);if(e&br){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(j(this.privateKey),1),t&&(t+="'")}else a.set(j(this.publicKey));for(let x=24;x>=0;x-=8)a[33+(x>>3)]=e>>24-x&255;let i=j(xa(ea.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=jo(F.from(r).add(this.privateKey).mod(e5)):l=new bn(W(r))._addPoint(this.publicKey);let p=t,f=this.mnemonic;return f&&(p=Object.freeze({phrase:f.phrase,path:t,locale:f.locale||"en"})),new It(xr,o,l,this.fingerprint,jo(s),e,this.depth+1,p)}derivePath(e){let t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let a=this;for(let i=0;i=br)throw new Error("invalid path index - "+r);a=a._derive(br+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=br)throw new Error("invalid path index - "+r);a=a._derive(s)}else throw new Error("invalid path component - "+r)}return a}static _fromSeed(e,t){let a=j(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=j(xa(ea.sha512,t5,a));return new It(xr,jo(i.slice(0,32)),null,"0x00000000",jo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=ll(a),e=wi(gr(e,a),a),It._fromSeed(pl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ha.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=W(t.slice(5,9)),r=parseInt(W(t.slice(9,13)).substring(2),16),s=W(t.slice(13,45)),o=t.slice(45,78);switch(W(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(xr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(xr,W(o.slice(1)),null,i,s,r,a,null)}return ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function pl(n,e){e||(e="");let t=ve("mnemonic"+e,Jt.NFKD);return Ti(ve(n,Jt.NFKD),t,2048,64,"sha512")}function gr(n,e){e=ll(e),ds.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=j(new Uint8Array(Math.ceil(11*t.length/8))),i=0;for(let p=0;p>3]|=1<<7-i%8),i++}let r=32*t.length/3,s=t.length/3,o=Tf(s);if((j(en(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return W(a.slice(0,r/8))}function wi(n,e){if(e=ll(e),n=j(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");let t=[0],a=11;for(let s=0;s8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],a-=8):(t[t.length-1]<<=a,t[t.length-1]|=n[s]>>8-a,t.push(n[s]&n5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return gr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=br||n%1)&&ds.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var yl=new E(_f);function a5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var kf=a5(),Ho=kf.crypto||kf.msCrypto;(!Ho||!Ho.getRandomValues)&&(yl.warn("WARNING: Missing strong random number source"),Ho={getRandomValues:function(n){return yl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ta(n){(n<=0||n>1024||n%1||n!=n)&&yl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Ho.getRandomValues(e),j(e)}function ls(n){n=n.slice();for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1)),a=n[e];n[e]=n[t],n[t]=a}return n}var ml=En(cl());var qo="json-wallets/5.7.0";function ga(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function Tr(n,e){for(n=String(n);n.length{L=j(L);let O=L.slice(0,16),U=L.slice(16,32),H=L.slice(32,64),M=new Ta.default.Counter(x),J=new Ta.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:W(x).substring(2)},ciphertext:W($).substring(2),kdf:"scrypt",kdfparams:{salt:W(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=ta(16),N=new Ta.default.Counter(R),q=new Ta.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+Tr(C.getUTCMonth()+1,2)+"-"+Tr(C.getUTCDate(),2)+"T"+Tr(C.getUTCHours(),2)+"-"+Tr(C.getUTCMinutes(),2)+"-"+Tr(C.getUTCSeconds(),2)+".0Z";T["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+T.address,mnemonicCounter:W(R).substring(2),mnemonicCiphertext:W(se).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(Go(n)){t&&t(0);let a=xl(n,e);return t&&t(1),Promise.resolve(a)}return zo(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(Go(n))return xl(n,e);if(zo(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},vr=new E(Ff);function u5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function d5(n){let e=n.mnemonic;return e&&e.phrase}var Pn=class extends Pt{constructor(e,t){if(super(),u5(e)){let a=new bn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",gn(this.publicKey)),this.address!==ce(e.address)&&vr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),d5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ba,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);gn(s.privateKey)!==this.address&&vr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(bn.isSigningKey(e))e.curve!=="secp256k1"&&vr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),B(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);let a=new bn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",gn(this.publicKey))}t&&!Xt.isProvider(t)&&vr.throwArgumentError("invalid provider","provider",t),B(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Pn(this,e)}signTransaction(e){return Se(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&vr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(rs(t)));return rs(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return qr(this._signingKey().signDigest(ir(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&vr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return qr(this._signingKey().signDigest(gt.hash(i.domain,t,i.value)))})}encrypt(e,t,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),wl(this,e,t,a)}static createRandom(e){let t=ta(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let a=wi(t,e.locale);return Pn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new Pn(i))}static fromEncryptedJsonSync(e,t){return new Pn(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ba),new Pn(It.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return xi(ir(n),e)}function Vf(n,e,t,a){return xi(gt.hash(n,e,t),a)}var ia={};Wi(ia,{AlchemyProvider:()=>Mr,AlchemyWebSocketProvider:()=>ws,AnkrProvider:()=>_s,BaseProvider:()=>aa,CloudflareProvider:()=>ks,EtherscanProvider:()=>As,FallbackProvider:()=>Ms,Formatter:()=>X,InfuraProvider:()=>Ir,InfuraWebSocketProvider:()=>Is,IpcProvider:()=>Ol,JsonRpcBatchProvider:()=>ou,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Ar,NodesmithProvider:()=>Ss,PocketProvider:()=>Rs,Provider:()=>Xt,Resolver:()=>kr,StaticJsonRpcProvider:()=>vs,UrlJsonRpcProvider:()=>St,Web3Provider:()=>Ps,WebSocketProvider:()=>_a,getDefaultProvider:()=>uu,getNetwork:()=>ys,isCommunityResourcable:()=>Al,isCommunityResource:()=>ms,showThrottleMessage:()=>na});var jf="networks/5.7.1";var Hf=new E(jf);function l5(n){return n&&typeof n.renetwork=="function"}function va(n){let e=function(t,a){a==null&&(a={});let i=[];if(t.InfuraProvider&&a.infura!=="-")try{i.push(new t.InfuraProvider(n,a.infura))}catch{}if(t.EtherscanProvider&&a.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,a.etherscan))}catch{}if(t.AlchemyProvider&&a.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,a.alchemy))}catch{}if(t.PocketProvider&&a.pocket!=="-"){let r=["goerli","ropsten","rinkeby","sepolia"];try{let s=new t.PocketProvider(n,a.pocket);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&a.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&a.ankr!=="-")try{let r=["ropsten"],s=new t.AnkrProvider(n,a.ankr);s.network&&r.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let r=1;return a.quorum!=null?r=a.quorum:n==="homestead"&&(r=2),new t.FallbackProvider(i,r)}return i[0]};return e.renetwork=function(t){return va(t)},e}function Jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Jo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:va("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:va("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:Jo("https://www.ethercluster.com/mordor","classicMordor")},Ko={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:va("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:va("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:va("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:va("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Jo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zf,classicTestnet:zf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Jo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:va("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:va("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ys(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ko){let i=Ko[a];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){let a=Ko[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ko[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(l5(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Wf="web/5.7.1";var p5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return p5(this,void 0,void 0,function*(){e==null&&(e={});let t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){let s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}let a=yield fetch(n,t),i=yield a.arrayBuffer(),r={};return a.headers.forEach?a.headers.forEach((s,o)=>{r[o.toLowerCase()]=s}):a.headers.keys().forEach(s=>{r[s.toLowerCase()]=a.headers.get(s)}),{headers:r,statusCode:a.status,statusMessage:a.statusText,body:j(new Uint8Array(i))}})}var y5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Nn=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ua(n,e){if(n==null)return null;if(typeof n=="string")return n;if(oa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function f5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function _l(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Nn.assertArgument(a>0&&a%1===0,"invalid connection throttle limit","connection.throttleLimit",a);let i=typeof n=="object"?n.throttleCallback:null,r=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;Nn.assertArgument(r>0&&r%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",r);let s=typeof n=="object"?!!n.errorPassThrough:!1,o={},l=null,p={method:"GET"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Nn.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(x=n.timeout),n.headers)for(let O in n.headers)o[O.toLowerCase()]={key:O,value:String(n.headers[O])},["if-none-match","if-modified-since"].indexOf(O.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Nn.throwError("basic authentication requires a secure https url",E.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+ar(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?nr(_[3]):f5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Nn.throwError("processing response error",E.errors.SERVER_ERROR,{body:Ua(_[1],_[2]),error:O,requestBody:null,requestMethod:"GET",url:l})}e&&(p.method="POST",p.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));let v={};Object.keys(o).forEach(O=>{let U=o[O];v[U.key]=U.value}),p.headers=v;let S=function(){let O=null;return{promise:new Promise(function(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(Nn.makeError("timeout",E.errors.TIMEOUT,{requestBody:Ua(p.body,v["content-type"]),requestMethod:p.method,timeout:x,url:l})))},x))}),cancel:function(){O!=null&&(clearTimeout(O),O=null)}}}(),L=function(){return y5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Nn.throwError("bad response",E.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:Ua(H,U.headers?U.headers["content-type"]:null),requestBody:Ua(p.body,v["content-type"]),requestMethod:p.method,url:l})),t)try{let M=yield t(H,U);return S.cancel(),M}catch(M){if(M.throttleRetry&&O{let o=null;if(r!=null)try{o=JSON.parse(Yt(r))}catch(l){Nn.throwError("invalid JSON",E.errors.SERVER_ERROR,{body:r,error:l})}return t&&(o=t(o,s)),o},i=null;if(e!=null){i=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return _l(n,i,a)}function On(n,e){return e||(e={}),e=we(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,a){let i=null,r=!1,s=()=>r?!1:(r=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&a(new Error("timeout"))},e.timeout));let o=e.retryLimit,l=0;function p(){return n().then(function(f){if(f!==void 0)s()&&t(f);else if(e.oncePoll)e.oncePoll.once("poll",p);else if(e.onceBlock)e.onceBlock.once("block",p);else if(!r){if(l++,l>o){s()&&a(new Error("retry limit reached"));return}let x=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));xe.ceiling&&(x=e.ceiling),setTimeout(p,x)}return null},function(f){s()&&a(f)})}p()})}var Il=En(Xf());var ke="providers/5.7.2";var cs=new E(ke),X=class{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let e={},t=this.address.bind(this),a=this.bigNumber.bind(this),i=this.blockTag.bind(this),r=this.data.bind(this),s=this.hash.bind(this),o=this.hex.bind(this),l=this.number.bind(this),p=this.type.bind(this),f=x=>this.data(x,!0);return e.transaction={hash:s,type:p,accessList:X.allowNull(this.accessList.bind(this),null),blockHash:X.allowNull(s,null),blockNumber:X.allowNull(l,null),transactionIndex:X.allowNull(l,null),confirmations:X.allowNull(l,null),from:t,gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),gasLimit:a,to:X.allowNull(t,null),value:a,nonce:l,data:r,r:X.allowNull(this.uint256),s:X.allowNull(this.uint256),v:X.allowNull(l),creates:X.allowNull(t,null),raw:X.allowNull(r)},e.transactionRequest={from:X.allowNull(t),nonce:X.allowNull(l),gasLimit:X.allowNull(a),gasPrice:X.allowNull(a),maxPriorityFeePerGas:X.allowNull(a),maxFeePerGas:X.allowNull(a),to:X.allowNull(t),value:X.allowNull(a),data:X.allowNull(f),type:X.allowNull(l),accessList:X.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:X.arrayOf(s),data:r,logIndex:l,blockHash:s},e.receipt={to:X.allowNull(this.address,null),from:X.allowNull(this.address,null),contractAddress:X.allowNull(t,null),transactionIndex:l,root:X.allowNull(o),gasUsed:a,logsBloom:X.allowNull(r),blockHash:s,transactionHash:s,logs:X.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:X.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:X.allowNull(a),status:X.allowNull(l),type:p},e.block={hash:X.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:X.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:X.allowNull(t),extraData:r,transactions:X.allowNull(X.arrayOf(s)),baseFeePerGas:X.allowNull(a)},e.blockWithTransactions=we(e.block),e.blockWithTransactions.transactions=X.allowNull(X.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:X.allowNull(i,void 0),toBlock:X.allowNull(i,void 0),blockHash:X.allowNull(s,void 0),address:X.allowNull(t,void 0),topics:X.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:X.allowNull(l),blockHash:X.allowNull(s),transactionIndex:l,removed:X.allowNull(this.boolean.bind(this)),address:t,data:X.allowFalsish(r,"0x"),topics:X.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return dn(e||[])}number(e){return e==="0x"?0:F.from(e).toNumber()}type(e){return e==="0x"||e==null?0:F.from(e).toNumber()}bigNumber(e){return F.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ie(e))?e.toLowerCase():cs.throwArgumentError("invalid hash","value",e)}data(e,t){let a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===fo?null:t}contractAddress(e){return fi(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ie(e))return Hn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?cs.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(e==null)return null;let t=F.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ie(e))throw new Error("invalid uint256");return me(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);let a=e._difficulty!=null?e._difficulty:e.difficulty,i=X.check(t,e);return i._difficulty=a==null?null:F.from(a),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return X.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&F.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);let t=X.check(this.formats.transaction,e);if(e.chainId!=null){let a=e.chainId;ie(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ie(a)&&(a=F.from(a).toNumber()),typeof a!="number"&&t.v!=null&&(a=(t.v-35)/2,a<0&&(a=0),a=parseInt(a)),typeof a!="number"&&(a=0),t.chainId=a}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Oo(e)}receiptLog(e){return X.check(this.formats.receiptLog,e)}receipt(e){let t=X.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){let a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&cs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):cs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&cs.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return X.check(this.formats.filter,e)}filterLog(e){return X.check(this.formats.filterLog,e)}static check(e,t){let a={};for(let i in e)try{let r=e[i](t[i]);r!==void 0&&(a[i]=r)}catch(r){throw r.checkKey=i,r.checkValue=t[i],r}return a}static allowNull(e,t){return function(a){return a==null?t:e(a)}}static allowFalsish(e,t){return function(a){return a?e(a):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");let a=[];return t.forEach(function(i){a.push(e(i))}),a}}};function Al(n){return n&&typeof n.isCommunityResource=="function"}function ms(n){return Al(n)&&n.isCommunityResource()}var Zf=!1;function na(){Zf||(Zf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var ue=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),v5=10;function ec(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){let t={};e.forEach(i=>{t[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function w5(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];let t=e.split("|").map(a=>a==="null"?null:a);return t.length===1?t[0]:t})}function _r(n){if(typeof n=="string"){if(n=n.toLowerCase(),Ft(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+tc(n);if(ko.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function hs(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var _5=["block","network","pending","poll"],Sl=class{constructor(e,t,a){B(this,"tag",e),B(this,"listener",t),B(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){let e=this.tag.split(":");if(e[0]!=="filter")return null;let t=e[1],a=w5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||_5.indexOf(this.tag)>=0}},k5={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function El(n){return me(F.from(n).toHexString(),32)}function ac(n){return ha.encode(ye([n,Ie(en(en(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Xo(n,e){try{return Yt(xs(n,e))}catch{}return null}function xs(n,e){if(n==="0x")return null;let t=F.from(Ie(n,e,e+32)).toNumber(),a=F.from(Ie(n,t,t+32)).toNumber();return Ie(n,t+32,t+32+a)}function Ml(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(n){let e=j(n);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function A5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(n){let e=[],t=0;for(let a=0;aF.from(e).eq(1)).catch(e=>{if(e.code===E.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return ue(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:kt([e,Na(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=kt(["0x9061b923",oc([ts(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=xs(r,0)),r}catch(r){if(r.code===E.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return ue(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?xs(a,0):null})}_getAddress(e,t){let a=k5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=j(t);if(a.p2pkh!=null){let r=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ac(ye([[a.p2pkh],"0x"+r[2]]))}}if(a.p2sh!=null){let r=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(r){let s=parseInt(r[1],16);if(r[2].length===s*2&&s>=1&&s<=75)return ac(ye([[a.p2sh],"0x"+r[2]]))}}if(a.prefix!=null){let r=i[1],s=i[0];if(s===0?r!==20&&r!==32&&(s=-1):s=-1,s>=0&&i.length===2+r&&r>=1&&r<=75){let o=Il.default.toWords(i.slice(2));return o.unshift(s),Il.default.encode(a.prefix,o)}}return null}getAddress(e){return ue(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===er?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===E.errors.CALL_EXCEPTION)return null;throw i}let t=yield this._fetchBytes("0xf1cb7e06",El(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",E.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return ue(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(t==null)return null;for(let a=0;as[l]);return"sia://"+o}return he.throwError("invalid or unsupported content hash data",E.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ue(this,void 0,void 0,function*(){let t=ve(e);t=ye([El(64),El(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Cl=null,E5=1,aa=class extends Xt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),B(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{let t=ht(new.target,"getNetwork")(e);t?(B(this,"_network",t),this.emit("network",t,null)):he.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ue(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||he.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:B(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return On(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Cl==null&&(Cl=new X),Cl}static getNetwork(e){return ys(e??"homestead")}ccipReadFetch(e,t,a){return ue(this,void 0,void 0,function*(){if(this.disableCcipRead||a.length===0)return null;let i=e.to.toLowerCase(),r=t.toLowerCase(),s=[];for(let o=0;o=0?null:JSON.stringify({data:r,sender:i}),x=yield Dn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,E.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return ue(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let i=this._internalBlockNumber;try{let r=yield i;if(hs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=hs(),a=Se({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:r})=>{if(r)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),r;let s=hs();return i=F.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return ue(this,void 0,void 0,function*(){let e=E5++,t=[],a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",E.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let i=this._emitted.block+1;i<=a;i++)this.emit("block",i);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;let r=this._emitted[i];r!=="pending"&&a-r>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(i=>{switch(i.type){case"tx":{let r=i.hash,s=this.getTransactionReceipt(r).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+r]=o.blockNumber,this.emit(r,o)),null)).catch(o=>{this.emit("error",o)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=a-1);let r=i.filter;r.fromBlock=i._lastBlockNumber+1,r.toBlock=a;let s=r.toBlock-this._maxFilterBlockRange;s>r.fromBlock&&(r.fromBlock=s),r.fromBlock<0&&(r.fromBlock=0);let o=this.getLogs(r).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(p=>{p.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=p.blockNumber),this._emitted["b:"+p.blockHash]=p.blockNumber,this._emitted["t:"+p.transactionHash]=p.blockNumber,this.emit(r,p)})}).catch(l=>{this.emit("error",l),i._inflight=!1});t.push(o)}break}}}),this._lastBlockNumber=a,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ue(this,void 0,void 0,function*(){return he.throwError("provider does not support network detection",E.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ue(this,void 0,void 0,function*(){let e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield nc(0),this._network;let a=he.makeError("underlying network changed",E.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=hs();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,a){return ue(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return ue(this,void 0,void 0,function*(){let r=yield this.getTransactionReceipt(e);return(r?r.confirmations:0)>=t?r:new Promise((s,o)=>{let l=[],p=!1,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.nonce)I=S;else{{let O=yield this.getTransaction(e);if(O&&O.blockNumber!=null)return}for(_==null&&(_=I-3,_{p||this.once("block",v)}))});if(p)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.push(()=>{clearTimeout(I)})}})})}getBlockNumber(){return ue(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return F.from(e)}catch(t){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Se({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Hn(s))}),r=yield this.perform("getStorageAt",i);try{return W(r)}catch(s){return he.throwError("bad result from backend",E.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:r,error:s})}})}_wrapTransaction(e,t,a){if(t!=null&&Ft(t)!==32)throw new Error("invalid response - sendTransaction");let i=e;return t!=null&&e.hash!==t&&he.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(r,s)=>ue(this,void 0,void 0,function*(){r==null&&(r=1),s==null&&(s=0);let o;r!==0&&a!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});let l=yield this._waitForTransaction(e.hash,r,s,o);return l==null&&r===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&he.throwError("transaction failed",E.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>W(r)),a=this.formatter.transaction(e);a.confirmations==null&&(a.confirmations=0);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let r=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(a,r,i)}catch(r){throw r.transaction=a,r.transactionHash=a.hash,r}})}_getTransactionRequest(e){return ue(this,void 0,void 0,function*(){let t=yield e,a={};return["from","to"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?this._getAddress(r):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?F.from(r):null))}),["type"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r??null))}),t.accessList&&(a.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(a[i]=Promise.resolve(t[i]).then(r=>r?W(r):null))}),this.formatter.transactionRequest(yield Se(a))})}_getFilter(e){return ue(this,void 0,void 0,function*(){e=yield e;let t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{e[a]!=null&&(t[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{e[a]!=null&&(t[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield Se(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=v5&&he.throwError("CCIP read exceeded maximum redirections",E.errors.SERVER_ERROR,{redirects:a,transaction:e});let i=e.to,r=yield this.perform("call",{transaction:e,blockTag:t});if(a>=0&&t==="latest"&&i!=null&&r.substring(0,10)==="0x556f1830"&&Ft(r)%32===4)try{let s=Ie(r,4),o=Ie(s,0,32);F.from(o).eq(i)||he.throwError("CCIP Read sender did not match",E.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:r});let l=[],p=F.from(Ie(s,32,64)).toNumber(),f=F.from(Ie(s,p,p+32)).toNumber(),x=Ie(s,p+32);for(let O=0;Oue(this,void 0,void 0,function*(){let r=yield this.perform("getBlock",i);if(r==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&a>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),o}return this.formatter.block(r)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return On(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransaction",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;let i=this.formatter.transactionResponse(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return On(()=>ue(this,void 0,void 0,function*(){let a=yield this.perform("getTransactionReceipt",t);if(a==null)return this._emitted["t:"+e]==null?null:void 0;if(a.blockHash==null)return;let i=this.formatter.receipt(a);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return ue(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Se({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),X.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return ue(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ue(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&he.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return ue(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;let a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new kr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return ue(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||he.throwError("network does not support ENS",E.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Na(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ue(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(ie(e))throw a}typeof e!="string"&&he.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return ue(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Xo(yield this.call({to:a,data:"0x691f3431"+Na(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ue(this,void 0,void 0,function*(){let t=null;if(ie(e)){let r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(r,"getAvatar");if(!s)return null;t=new kr(this,s,r);try{let o=yield t.getAvatar();if(o)return o.url}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o}try{let o=Xo(yield this.call({to:s,data:"0x691f3431"+Na(r).substring(2)}),0);t=yield this.getResolver(o)}catch(o){if(o.code!==E.errors.CALL_EXCEPTION)throw o;return null}}else if(t=yield this.getResolver(e),!t)return null;let a=yield t.getAvatar();return a==null?null:a.url})}perform(e,t){return he.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,a){let i=new Sl(_r(e),t,a);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let a=!1,i=[],r=_r(e);return this._events=this._events.filter(s=>s.tag!==r?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),a=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),a}listenerCount(e){if(!e)return this._events.length;let t=_r(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=_r(e);return this._events.filter(a=>a.tag===t).map(a=>a.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);let a=[],i=!1,r=_r(e);return this._events=this._events.filter(s=>s.tag!==r||s.listener!=t||i?!0:(i=!0,a.push(s),!1)),a.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{let a=_r(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var wa=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Et=new E(ke),M5=["call","estimateGas"];function gs(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ie(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(let t in n){let a=gs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return gs(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=gs(e,!0);if(r)return r.data;Et.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=gs(e.body,!1);r==null&&(r=gs(e,!1)),r&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,error:e})}let i=e.message;throw e.code===E.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Et.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Et.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Et.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Et.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),M5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Et.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function uc(n){return new Promise(function(e){setTimeout(e,n)})}function C5(n){if(n.error){let e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function bs(n){return n&&n.toLowerCase()}var Rl={},Ar=class extends Pt{constructor(e,t,a){if(super(),e!==Rl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");B(this,"provider",t),a==null&&(a=0),typeof a=="string"?(B(this,"_address",this.provider.formatter.address(a)),B(this,"_index",null)):typeof a=="number"?(B(this,"_index",a),B(this,"_address",null)):Et.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Et.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Pl(Rl,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Et.throwError("unknown account #"+this._index,E.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>wa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&Et.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Se({tx:Se(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&Et.throwArgumentError("from address mismatch","transaction",e):a.from=i;let r=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return Et.throwError("signing transactions is unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return wa(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield On(()=>wa(this,void 0,void 0,function*(){let i=yield this.provider.getTransaction(a);if(i!==null)return this.provider._wrapTransaction(i,a,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=a,i}})}signMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[W(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),W(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return wa(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,s=>this.provider.resolveName(s)),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return wa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Pl=class extends Ar{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(t,a)}))}},I5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},tn=class extends aa{constructor(e,t){let a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(this.constructor,"defaultUrl")()),typeof e=="string"?B(this,"connection",Object.freeze({url:e})):B(this,"connection",Object.freeze(we(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return wa(this,void 0,void 0,function*(){yield uc(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){let t=ht(this.constructor,"getNetwork");try{return t(F.from(e).toNumber())}catch(a){return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Ar(Rl,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Dn(this.connection,JSON.stringify(a),C5).then(s=>(this.emit("debug",{action:"response",request:a,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:a,provider:this}),s});return i&&(this._cache[e]=r,setTimeout(()=>{this._cache[e]=null},0)),r}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[bs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[bs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[bs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[bs(t.address),me(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=bs(t.filter.address)),["eth_getLogs",[t.filter]];default:break}return null}perform(e,t){return wa(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&F.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){let r=yield this.getFeeData();r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null&&(t=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&Et.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;let e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(a){function i(){e.send("eth_getFilterChanges",[a]).then(function(r){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return r.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(o).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return uc(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){i()},0),null}).catch(r=>{})}return i(),a}).catch(a=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let a=we(I5);if(t)for(let r in t)t[r]&&(a[r]=!0);$i(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=Hn(F.from(e[r]));r==="gasLimit"&&(r="gas"),i[r]=s}),["from","to","data"].forEach(function(r){e[r]!=null&&(i[r]=W(e[r]))}),e.accessList&&(i.accessList=dn(e.accessList)),i}};var Er=null;try{if(Er=WebSocket,Er==null)throw new Error("inject please")}catch{let e=new E(ke);Er=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Nl=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Zo=new E(ke),S5=1,_a=class extends tn{constructor(e,t){t==="any"&&Zo.throwError("WebSocketProvider does not support 'any' network yet",E.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?B(this,"_websocket",new Er(this.connection.url)):B(this,"_websocket",e),B(this,"_requests",{}),B(this,"_subs",{}),B(this,"_subIds",{}),B(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{let r=i.data,s=JSON.parse(r);if(s.id!=null){let o=String(s.id),l=this._requests[o];if(delete this._requests[o],s.result!==void 0)l.callback(null,s.result),this.emit("debug",{action:"response",request:JSON.parse(l.payload),response:s.result,provider:this});else{let p=null;s.error?(p=new Error(s.error.message||"unknown error"),B(p,"code",s.error.code||null),B(p,"response",r)):p=new Error("unknown error"),l.callback(p,void 0),this.emit("debug",{action:"response",error:p,request:JSON.parse(l.payload),provider:this})}}else if(s.method==="eth_subscription"){let o=this._subs[s.params.subscription];o&&o.processFunc(s.params.result)}else console.warn("this should not happen")};let a=setInterval(()=>{this.emit("poll")},1e3);a.unref&&a.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Zo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Zo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Nl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Zo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=S5++;return new Promise((i,r)=>{function s(l,p){return l?r(l):i(p)}let o=JSON.stringify({method:e,params:t,id:a,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(a)]={callback:s,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,a){return Nl(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(t).then(s=>this.send("eth_subscribe",s)),this._subIds[e]=i);let r=yield i;this._subs[r]={tag:e,processFunc:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=F.from(t.number).toNumber();this._emitted.block=a,this.emit("block",a)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],t=>{this.emit("pending",t)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{t.removed==null&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))});break;case"tx":{let t=a=>{let i=a.hash;this.getTransactionReceipt(i).then(r=>{!r||this.emit(i,r)})};t(e),this._subscribe("tx",["newHeads"],a=>{this._events.filter(i=>i.type==="tx").forEach(t)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let t=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;t="tx"}else if(this.listenerCount(e.event))return;let a=this._subIds[t];!a||(delete this._subIds[t],a.then(i=>{!this._subs[i]||(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return Nl(this,void 0,void 0,function*(){this.websocket.readyState===Er.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var R5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ts=new E(ke),vs=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return R5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||Ts.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},St=class extends vs{constructor(e,t){Ts.checkAbstract(new.target,St),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?B(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{B(this,i,t[i])})}_startPending(){Ts.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Ts.throwError("API provider does not support signing",E.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return Ts.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(ke),eu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ws=class extends _a{constructor(e,t){let a=new Mr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),B(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===eu}},Mr=class extends St{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){return e==null?eu:(e&&typeof e!="string"&&lc.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===eu&&na(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===eu}};var P5=new E(ke),tu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function N5(n){switch(n){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return P5.throwArgumentError("unsupported network","name",n)}var _s=class extends St{isCommunityResource(){return this.apiKey===tu}static getApiKey(e){return e??tu}static getUrl(e,t){t==null&&(t=tu);let a={allowGzip:!0,url:"https://"+N5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===tu&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var D5=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(ke),ks=class extends St{static getApiKey(e){return e!=null&&pc.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let a=null;switch(e.name){case"homestead":a="https://cloudflare-eth.com/";break;default:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return D5(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield a.perform.call(this,"getBlock",{blockTag:"latest"})).number:a.perform.call(this,e,t)})}};var nu=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Va=new E(ke);function yc(n){let e={};for(let t in n){if(n[t]==null)continue;let a=n[t];t==="type"&&a===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[t]?a=Hn(W(a)):t==="accessList"?a="["+dn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function O5(n){if(n.status==0&&(n.message==="No records found"||n.message==="No transactions found"))return n.result;if(n.status!=1||typeof n.message!="string"||!n.message.match(/^OK/)){let e=new Error("invalid response");throw e.result=JSON.stringify(n),(n.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return n.result}function fc(n){if(n&&n.status==0&&n.message=="NOTOK"&&(n.result||"").toLowerCase().indexOf("rate limit")>=0){let e=new Error("throttled response");throw e.result=JSON.stringify(n),e.throttleRetry=!0,e}if(n.jsonrpc!="2.0"){let e=new Error("invalid response");throw e.result=JSON.stringify(n),e}if(n.error){let e=new Error(n.error.message||"unknown error");throw n.error.code&&(e.code=n.error.code),n.error.data&&(e.data=n.error.data),e}return n.result}function cc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Dl(n,e,t){if(n==="call"&&e.code===E.errors.SERVER_ERROR){let i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let r=i.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),ie(r))return r;Va.throwError("missing revert data in call exception",E.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let a=e.message;throw e.code===E.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?a=e.error.message:typeof e.body=="string"?a=e.body:typeof e.responseText=="string"&&(a=e.responseText)),a=(a||"").toLowerCase(),a.match(/insufficient funds/)&&Va.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Va.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Va.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.match(/execution failed due to an exception|execution reverted/)&&Va.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:t}),e}var As=class extends aa{constructor(e,t){super(e),B(this,"baseUrl",this.getBaseUrl()),B(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return Va.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let a=Object.keys(t).reduce((r,s)=>{let o=t[s];return o!=null&&(r+=`&${s}=${o}`),r},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${a}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,a){return nu(this,void 0,void 0,function*(){let i=a?this.getPostUrl():this.getUrl(e,t),r=a?this.getPostData(e,t):null,s=e==="proxy"?fc:O5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&na(),Promise.resolve(!0))},l=null;r&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(r).map(f=>`${f}=${r[f]}`).join("&"));let p=yield Dn(o,l,s||fc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return nu(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return nu(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(i=>Dl("sendTransaction",i,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");let i=yc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Dl("call",r,t.transaction)}}case"estimateGas":{let i=yc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Dl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Va.throwError("unsupported topic count",E.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),t.filter.topics.length===1)){let o=t.filter.topics[0];(typeof o!="string"||o.length!==66)&&Va.throwError("unsupported topic format",E.errors.UNSUPPORTED_OPERATION,{topic0:o}),i.topic0=o}let r=yield this.fetch("logs",i),s={};for(let o=0;o{["contractAddress","to"].forEach(function(l){s[l]==""&&delete s[l]}),s.creates==null&&s.contractAddress!=null&&(s.creates=s.contractAddress);let o=this.formatter.transactionResponse(s);return s.timeStamp&&(o.timestamp=parseInt(s.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}};var ru=function(n,e,t,a){function i(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function o(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},_i=new E(ke);function au(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Cr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(F.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Cr(e)));if(typeof n=="object"){let e=Object.keys(n);return e.sort(),"{"+e.map(t=>{let a=n[t];return typeof a=="function"?a="[function]":a=Cr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var B5=1;function xc(n){let e=null,t=null,a=new Promise(s=>{e=function(){t&&(clearTimeout(t),t=null),s()},t=setTimeout(e,n)}),i=s=>(a=a.then(s),a);function r(){return a}return{cancel:e,getPromise:r,wait:i}}var F5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],L5=["address","args","errorArgs","errorSignature","method","transaction"];function iu(n,e){let t={weight:n.weight};return Object.defineProperty(t,"provider",{get:()=>n.provider}),n.start&&(t.start=n.start),e&&(t.duration=e-n.start),n.done&&(n.error?t.error=n.error:t.result=n.result||null),t}function U5(n,e){return function(t){let a={};t.forEach(r=>{let s=n(r.result);a[s]||(a[s]={count:0,result:r.result}),a[s].count++});let i=Object.keys(a);for(let r=0;r=e)return s.result}}}function V5(n,e,t){let a=Cr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(i.map(o=>o.result),2);if(s!=null)return s=Math.ceil(s),r.indexOf(s+1)>=0&&s++,s>=n._highestBlockNumber&&(n._highestBlockNumber=s),n._highestBlockNumber};case"getGasPrice":return function(i){let r=i.map(s=>s.result);return r.sort(),r[Math.floor(r.length/2)]};case"getEtherPrice":return function(i){return hc(i.map(r=>r.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,Cr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Cr(i))}:a=function(i){return i==null?null:Cr(i)};break;default:throw new Error("unknown method: "+e)}return U5(a,n.quorum)}function Es(n,e){return ru(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:On(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function j5(n,e,t,a){return ru(this,void 0,void 0,function*(){let i=n.provider;switch(t){case"getBlockNumber":case"getGasPrice":return i[t]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),t==="call"&&a.blockTag?i[t](a.transaction,a.blockTag):i[t](a.transaction);case"getTransaction":case"getTransactionReceipt":return i[t](a.transactionHash);case"getLogs":{let r=a.filter;return(r.fromBlock&&ie(r.fromBlock)||r.toBlock&&ie(r.toBlock))&&(i=yield Es(n,e)),i.getLogs(r)}}return _i.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ms=class extends aa{constructor(e,t){e.length===0&&_i.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=ms(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ms(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&_i.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,p),Object.freeze(l)}),i=a.reduce((s,o)=>s+o.weight,0);t==null?t=i/2:t>i&&_i.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=mc(a.map(s=>s.provider.network));r==null&&(r=new Promise((s,o)=>{setTimeout(()=>{this.detectNetwork().then(s,o)},0)})),super(r),B(this,"providerConfigs",Object.freeze(a)),B(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return ru(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(e)})}perform(e,t){return ru(this,void 0,void 0,function*(){if(e==="sendTransaction"){let l=yield Promise.all(this.providerConfigs.map(p=>p.provider.sendTransaction(t.signedTransaction).then(f=>f.hash,f=>f)));for(let p=0;pl.priority-p.priority);let r=this._highestBlockNumber,s=0,o=!0;for(;;){let l=au(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=j5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,au()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,au()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:iu(_,null),request:{method:e,params:mt(t)},provider:this}),p+=_.weight}let f=[];i.forEach(_=>{_.done||!_.runner||(f.push(_.runner),_.staller&&f.push(_.staller.getPromise()))}),f.length&&(yield Promise.race(f));let x=i.filter(_=>_.done&&_.error==null);if(x.length>=this.quorum){let _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return F5.indexOf(S)>=0&&(_[S]||(_[S]={error:v.error,weight:0}),_[S].weight+=v.weight),_},{});if(Object.keys(I).forEach(_=>{let v=I[_];if(v.weight{O.staller&&O.staller.cancel(),O.cancelled=!0});let S=v.error,L={};L5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),_i.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),_i.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>iu(l)),provider:this})})}};var Ol=null;var su=new E(ke),Cs="84842078b09946638c03157f83405213",Is=class extends _a{constructor(e,t){let a=new Ir(e,t),i=a.connection;i.password&&su.throwError("INFURA WebSocket project secrets unsupported",E.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let r=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(r,e),B(this,"apiKey",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Cs}},Ir=class extends St{static getWebSocketProvider(e,t){return new Is(e,t)}static getApiKey(e){let t={apiKey:Cs,projectId:Cs,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(su.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),su.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:su.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===Cs&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Cs}};var ou=class extends tn{send(e,t){let a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);let i={request:a,resolve:null,reject:null},r=new Promise((s,o)=>{i.resolve=s,i.reject=o});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let s=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let o=s.map(l=>l.request);return this.emit("debug",{action:"requestBatch",request:mt(o),provider:this}),Dn(this.connection,JSON.stringify(o)).then(l=>{this.emit("debug",{action:"response",request:o,response:l,provider:this}),s.forEach((p,f)=>{let x=l[f];if(x.error){let I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}else p.resolve(x.result)})},l=>{this.emit("debug",{action:"response",error:l,request:o,provider:this}),s.forEach(p=>{p.reject(l)})})},10)),r}};var Bl=new E(ke),H5="ETHERS_JS_SHARED",Ss=class extends St{static getApiKey(e){return e&&typeof e!="string"&&Bl.throwArgumentError("invalid apiKey","apiKey",e),e||H5}static getUrl(e,t){Bl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let a=null;switch(e.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var bc=new E(ke),gc="62e1ad51b37b8e00394bda3b",Rs=class extends St{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let a=null;switch(e?e.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:bc.throwError("unsupported network",E.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i=`https://${a}/v1/lb/${t.applicationId}`,r={headers:{},url:i};return t.applicationSecretKey!=null&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===gc}};var Tc=new E(ke),q5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:q5++,jsonrpc:"2.0"};return new Promise((s,o)=>{this.emit("debug",{action:"request",fetcher:t,request:mt(r),provider:this}),e(r,(l,p)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:r,provider:this}),o(l);if(this.emit("debug",{action:"response",fetcher:t,request:r,response:p,provider:this}),p.error){let f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function G5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(a),provider:this}),n.request(a).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:i,provider:this}),i})}}var Ps=class extends tn{constructor(e,t){e==null&&Tc.throwArgumentError("missing provider","provider",e);let a=null,i=null,r=null;typeof e=="function"?(a="unknown:",i=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),r=e,e.request?(a===""&&(a="eip-1193:"),i=G5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var wc=new E(ke);function uu(n,e){if(n==null&&(n="homestead"),typeof n=="string"){let a=n.match(/^(ws|http)s?:/i);if(a)switch(a[1].toLowerCase()){case"http":case"https":return new tn(n);case"ws":case"wss":return new _a(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ys(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ms,AlchemyProvider:Mr,AnkrProvider:_s,CloudflareProvider:ks,EtherscanProvider:As,InfuraProvider:Ir,JsonRpcProvider:tn,NodesmithProvider:Ss,PocketProvider:Rs,Web3Provider:Ps,IpcProvider:null},e)}var te={};Wi(te,{AbiCoder:()=>tr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>ge,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>It,Indexed:()=>pa,Interface:()=>Da,LogDescription:()=>rr,Logger:()=>E,ParamType:()=>yt,RLP:()=>io,SigningKey:()=>bn,SupportedAlgorithm:()=>ea,TransactionDescription:()=>sr,TransactionTypes:()=>Do,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>bo,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>gt,_fetchData:()=>_l,_toEscapedUtf8String:()=>Cd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ha,base64:()=>Dd,checkProperties:()=>$i,checkResultErrors:()=>Yi,commify:()=>Sc,computeAddress:()=>gn,computeHmac:()=>xa,computePublicKey:()=>is,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Zr,defaultPath:()=>ba,defineReadOnly:()=>B,dnsEncode:()=>ts,entropyToMnemonic:()=>wi,fetchJson:()=>Dn,formatBytes32String:()=>Id,formatEther:()=>Rc,formatUnits:()=>Fl,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>fi,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>bl,getStatic:()=>ht,hashMessage:()=>ir,hexConcat:()=>kt,hexDataLength:()=>Ft,hexDataSlice:()=>Ie,hexStripZeros:()=>xd,hexValue:()=>Hn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Ny,isBytes:()=>pn,isBytesLike:()=>oa,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Bd,joinSignature:()=>qr,keccak256:()=>fe,mnemonicToEntropy:()=>gr,mnemonicToSeed:()=>pl,namehash:()=>Na,nameprep:()=>Nd,parseBytes32String:()=>Sd,parseEther:()=>Pc,parseTransaction:()=>Oo,parseUnits:()=>Ll,poll:()=>On,randomBytes:()=>ta,recoverAddress:()=>xi,recoverPublicKey:()=>No,resolveProperties:()=>Se,ripemd160:()=>os,serializeTransaction:()=>rs,sha256:()=>en,sha512:()=>ol,shallowCopy:()=>we,shuffled:()=>ls,solidityKeccak256:()=>Ac,solidityPack:()=>du,soliditySha256:()=>Ec,splitSignature:()=>qn,stripZeros:()=>nn,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Pa,toUtf8String:()=>Yt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>di});var _c="solidity/5.7.0";var z5=new RegExp("^bytes([0-9]+)$"),W5=new RegExp("^(u?int)([0-9]*)$"),K5=new RegExp("^(.*)\\[([0-9]*)\\]$"),J5="0000000000000000000000000000000000000000000000000000000000000000",Sr=new E(_c);function kc(n,e,t){switch(n){case"address":return t?di(e,32):j(e);case"string":return ve(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?di(e,32):j(e)}let a=n.match(W5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Sr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),di(e,i/8)}if(a=n.match(z5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Sr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Sr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+J5).substring(0,66)):e}if(a=n.match(K5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Sr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Sr.throwArgumentError("invalid type","type",n)}function du(n,e){n.length!=e.length&&Sr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(du(n,e))}function Ec(n,e){return en(du(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.throwArgumentError("invalid value","value",n);let t=e[0],a="";for(t.substring(0,1)==="-"&&(a="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);let r=[];for(;t.length;)if(t.length<=3){r.unshift(t);break}else{let s=t.length-3;r.unshift(t.substring(s)),t=t.substring(0,s)}return a+r.join(",")+i}function Fl(n,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return Ji(n,e??18)}function Ll(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return fn(n,e??18)}function Rc(n){return Fl(n,18)}function Pc(n){return Ll(n,18)}var lu="ethers/5.7.2";var Nc=new E(lu);try{let n=window;n._ethers==null&&(n._ethers=Ul)}catch{}var Bn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Bn||(Bn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var pu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(pu||(pu={}));var Rr;(function(n){n.Mainnet="https://colony.io/reputation/mainnet",n.Goerli="https://colony.io/reputation/goerli",n.Xdai="https://xdai.colony.io/reputation/xdai",n.XdaiQa="https://qa-xdai.colony.io/reputation/xdai",n.Custom="http://localhost:3000",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Rr||(Rr={}));var yu;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/metatransaction/xdai",n.Xdai="https://xdai.colony.io/metatransaction/xdai",n.XdaiQa="https://xdai.colony.io/metatransaction/xdai",n.Custom="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(yu||(yu={}));var Vl;(function(n){n.Mainnet="",n.Goerli="",n.Gnosis="https://xdai.colony.io/rpc/",n.Xdai="https://xdai.colony.io/rpc/",n.XdaiQa="https://xdai.colony.io/rpc/",n.Custom="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Vl||(Vl={}));var Ns;(function(n){n.Mainnet=".colony.joincolony.eth",n.Goerli=".colony.joincolony.test",n.Gnosis=".colony.joincolony.colonyxdai",n.Xdai=".colony.joincolony.colonyxdai",n.XdaiQa=".colony.joincolony.colonyxdai",n.Custom=".colony.joincolony.test",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ns||(Ns={}));var Ds;(function(n){n.Mainnet=".user.joincolony.eth",n.Goerli=".user.joincolony.test",n.Gnosis=".user.joincolony.colonyxdai",n.Xdai=".user.joincolony.colonyxdai",n.XdaiQa=".user.joincolony.colonyxdai",n.Custom=".user.joincolony.test",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ds||(Ds={}));var jl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(jl||(jl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var Ot;(function(n){n[n.Null=0]="Null",n[n.Staking=1]="Staking",n[n.Submit=2]="Submit",n[n.Reveal=3]="Reveal",n[n.Closed=4]="Closed",n[n.Finalizable=5]="Finalizable",n[n.Finalized=6]="Finalized",n[n.Failed=7]="Failed"})(Ot||(Ot={}));var ql="0x12345678",Hl;(function(n){n[n.Unassigned=0]="Unassigned",n[n.Domain=1]="Domain",n[n.Task=2]="Task",n[n.Payment=3]="Payment",n[n.Expenditure=4]="Expenditure"})(Hl||(Hl={}));var wt;(function(n){n[n.Recovery=0]="Recovery",n[n.Root=1]="Root",n[n.Arbitration=2]="Arbitration",n[n.Architecture=3]="Architecture",n[n.ArchitectureSubdomain=4]="ArchitectureSubdomain",n[n.Funding=5]="Funding",n[n.Administration=6]="Administration",n[n.LAST_ROLE=7]="LAST_ROLE"})(wt||(wt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Gl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],ki=class{static createInterface(){return new te.Interface(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(ki,"abi",Gl);var zl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ai=class{static createInterface(){return new te.Interface(zl)}static connect(e,t){return new oe(e,zl,t)}};xe(Ai,"abi",zl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},Wl=n=>n!=null;var{keccak256:Q5,toUtf8Bytes:Y5}=te,{MaxUint256:X5}=xt;var Pr=n=>te.formatEther(n),Nr=n=>te.parseEther(n);var Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(wt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Wl)},Ei=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return X5;let{skillId:i}=await e.getDomain(t),{skillId:r}=await e.getDomain(a),{children:s}=await n.getSkill(i),o=s.findIndex(l=>l.eq(r));if(o<0)throw new Error(`Could not find ${a} as a child of ${t}`);return F.from(o)},ja=n=>Q5(Y5(n));var Dr=async(n,e)=>(await Ai.connect(n,e).version()).toNumber(),Jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Wl);var{hexDataSlice:$l}=te,{MaxUint256:Z5}=xt,Bc=n=>{let e=$l(n,0,3),t=F.from($l(n,4,35)),a=F.from($l(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=async(n,e,t,a,i)=>{let r=i||await e.signer?.getAddress();if(!r)throw new Error("Could not determine address for permission proofs. Please use a signer or provide a custom address");if(await e.hasUserRole(r,t,a))return[F.from(t),Z5,r];let o=F.from(_e.RootDomain);if(!await e.hasUserRole(r,o,a))throw new Error(`${r} does not have the permission ${a} in any parent domain`);let p=await Ei(n,e,o,t);if(p.lt(0))throw new Error(`${r} does not have the permission ${a} in any parent domain`);return[o,p,r]},eb=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ra(n,e,t,a[0],i):eb(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:tb}=xt;async function nb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),fu(t)}catch{return[]}}async function Os(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=ki.connect(r,a.signer||a.provider),_=await nb(I,p);if(_.includes(wt.Root)||_.length===0){if(!F.from(i).eq(1))throw new Error(`On root or not permissioned actions, the domainId needs to be ${_e.RootDomain}`);o=Lc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Lc;else{let{children:M}=await n.getSkill(l),J=M.findIndex($=>$.eq(H));if(J<0)throw new Error(`Could not find ${H} as a child of ${l}`);o=F.from(J)}}let{key:v,value:S,branchMask:L,siblings:O}=await t.getReputationWithProofs(l,tb);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:ab}=xt,sa=class{static async fetchReputation(e){let t=await fetch(e);if(t.ok)return t.json();throw new Error(`No reputation entry found for query ${e}`)}colony;network;endpointUrl;constructor(e,t,a){this.colony=t,this.network=e;let i=a?.network||Bn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Rr[i]}async getRootHash(e){let t=e||await this.network.getReputationRootHash();if(F.from(t).isZero())throw new Error("No reputation for given rootHash found (yet)");return t}async getBaseEndpoint(e){let t=await this.getRootHash(e);return`${this.endpointUrl}/${t}/${this.colony.address}`}async getReputation(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await sa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationWithProofs(e,t,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}`,o=await sa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await sa.fetchReputation(i),s=await this.colony.getDomainCount();return(await Promise.all(Array.from(new Array(s.toNumber())).map(async(l,p)=>{let f=p+1,x=await this.colony.getDomain(f);return{domainId:f,skillId:x.skillId.toNumber()}}))||[]).map(l=>{let p,f=(r?.reputations||[]).find(({skill_id:x})=>x===l.skillId);return f&&(p=f?.reputationAmount),{...l,reputationAmount:p?F.from(p):void 0}})}async getMembersReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return sa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${ab}/noProof`,s=await sa.fetchReputation(r);return{...s,reputationAmount:F.from(s.reputationAmount||0)}}async getReputationFraction(e,t,a,i=3){let{reputationAmount:r}=await this.getReputation(e,t,a),{reputationAmount:s}=await this.getTotalReputation(e,a);return r.mul(F.from(10).pow(i)).div(s).toNumber()/10**i}};var Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Hk=Mt(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,zk=Mt(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Jk=Mt(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Yk=Mt(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,eA=Mt(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,aA=Mt(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,sA=Mt(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,dA=Mt(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,yA=Mt(dm),Ql={1:[],2:[1,2,3,4,5,6],3:[1,2,3,4,5,6],4:[1,2,3,4,5,6],5:[1,2,3,4,5,6],6:[1,2,3,4,5,6],7:[1,2,3,4,5,6],8:[1,2,3,4,5,6],9:[1,2,3,4,5,6],10:[1,2,3,4,5,6],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Yl=dm-1;var lm=18,ib=Mt(lm),mA=lm-1;var rb=(n,e)=>{switch(n){case Ae.FundingQueue:return Vc[e];case Ae.IVotingReputation:return Ql[e];case Ae.MultisigPermissions:return qc[e];case Ae.OneTxPayment:return Wc[e];case Ae.ReputationBootstrapper:return $c[e];case Ae.StagedExpenditure:return tm[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return im[e];case Ae.TokenSupplier:return om[e];case Ae.VotingReputation:return Ql[e];default:return Oc(n,"Could not find extension with name")}},Mi=(n,e,t)=>{let a=rb(n,e);return!!a&&!a.includes(t)};var sb={[Ae.FundingQueue]:jc,[Ae.IVotingReputation]:Yl,[Ae.MultisigPermissions]:Gc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:Qc,[Ae.StagedExpenditure]:nm,[Ae.StakedExpenditure]:Zc,[Ae.StreamingPayments]:rm,[Ae.TokenSupplier]:um,[Ae.VotingReputation]:Yl};var P6=En(pm(),1);var gp=En(I6(),1);var Pe;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Pe||(Pe={}));var bp=2,xp;(function(n){n[n.LightPink=0]="LightPink",n[n.Pink=1]="Pink",n[n.Black=2]="Black",n[n.EmeraldGreen=3]="EmeraldGreen",n[n.Blue=4]="Blue",n[n.Yellow=5]="Yellow",n[n.Red=6]="Red",n[n.Green=7]="Green",n[n.Periwinkle=8]="Periwinkle",n[n.Gold=9]="Gold",n[n.Aqua=10]="Aqua",n[n.BlueGrey=11]="BlueGrey",n[n.Purple=12]="Purple",n[n.Orange=13]="Orange",n[n.Magenta=14]="Magenta",n[n.PurpleGrey=15]="PurpleGrey"})(xp||(xp={}));var S6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,g1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),Tp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==bp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Pe.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Pe.Colony?g1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:bp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.data};var vp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},wp=vp;var _p=(0,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),qs={[Pe.Annotation]:"Annotation(address,bytes32,string)",[Pe.Colony]:"ColonyMetadata(address,string)",[Pe.Decision]:"Annotation(address,bytes32,string)",[Pe.Domain]:"DomainMetadata(address,uint256,string)",[Pe.Misc]:"",[Pe.DEFAULT]:""},Ur=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(qs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await _p(a)).json();return Tp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await _p(a)).json(),s=Object.entries(qs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return Tp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await _p(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var UE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var kp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};xe(kn,"abi",kp);var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],An=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(An,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(Ni,"abi",Ep);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],N6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",_1=n=>n.length>1,Fn=class extends gi{constructor(...e){_1(e)?super(...e):super(Ku,N6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Fn,"bytecode",N6),xe(Fn,"abi",Ku);var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Di,"abi",Mp);var Oi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Oi||(Oi={}));var Ln;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Ln||(Ln={}));var{AddressZero:M1}=xt;async function C1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(n,e)=>{let t,a=!0,i=!0;t=Fn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await C1(t)}catch{a=!1}try{await t.nonces(M1)}catch{i=!1}return a?t.tokenClientType=Ln.Colony:i?(t=An.connect(n,e),t.tokenClientType=Ln.Erc2612):(t=kn.connect(n,e),t.tokenClientType=Ln.Erc20),t.clientType=Oi.TokenClient,t},Cp=I1;var S1=(n,e)=>{let t=Di.connect(n,e);return t.clientType=Oi.TokenLockingClient,t},Ip=S1;var{AddressZero:Sp}=xt,R1=kn.connect(Sp,new ia.BaseProvider(3656691)).interface,P1=Ni.connect(Sp,new ia.BaseProvider(3656691)).interface,N1=An.connect(Sp,new ia.BaseProvider(3656691)).interface;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Gs.abi=Rp;var Pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],zs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};zs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Bi.abi=Np;var ka=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(){let e=[];return typeof this.args=="function"?e=await this.args():e=this.args,e}async getTx(){let e=await this.getArgs();return await this.contract.functions[this.method].apply(this.contract,e)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,qs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jl(t.logs,this.contract.interface),t}tx(){return{send:async()=>{let e=await this.getTx();return[e,this.getMined.bind(this,e)]},mined:async()=>{let e=await this.getTx();return this.getMined(e)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:O1,solidityKeccak256:B1,splitSignature:F1}=te,Ga=class extends ka{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Bn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=B1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=O1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=F1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Dp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Fi.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Li=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Li.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ui.abi=Bp;var Fp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Vi.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};ji.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Hi.abi=Up;var{AddressZero:G1}=xt,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(Un.extensionType),e.address);if(t===G1)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(Un.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Un.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Un(e,r,a)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding],this.oneTxPaymentContract.address),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},za=Un;za.supportedVersions=[{version:3,factory:Vi},{version:4,factory:ji},{version:5,factory:Hi}],za.extensionType=Ae.OneTxPayment;var Vn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Ws=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Fn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var Ks=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=An.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var D6=async(n,e)=>{let t=await Cp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Ln.Colony:return new Ws(n,t);case Ln.Erc20:return new Vn(n,t);case Ln.Erc2612:return new Ks(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};qi.abi=Vp;var jp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Gi.abi=jp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};zi.abi=Hp;var{AddressZero:qp}=xt;var $u=F.from(10).pow(18),jn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(jn.extensionType),e.address);if(t===qp)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(jn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${jn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=jn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${jn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new jn(e,r,a)}static getLatestSupportedVersion(){return jn.supportedVersions[jn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Os(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,qp,ql);return[e,t,qp,ql,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Pe.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Ot.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Ot[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Pr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,wt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await Ei(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Wa=jn;Wa.supportedVersions=[{version:7,factory:qi},{version:8,factory:Gi},{version:9,factory:zi}],Wa.extensionType=Ae.VotingReputation;var J1={["motion"]:Wa,["oneTx"]:za},jr=class{static async connect(e,t){let a=await Dr(t,e.config.signerOrProvider),i=jr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new jr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return jr.supportedVersions[jr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new sa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await za.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Vn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Pe.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Pe.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:wt.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ra(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,wt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ei(x,this.colony,r,s),_=await Ei(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Pe.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Annotation})}installExtension(e){let t=J1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Mi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[ja(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return fu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:wt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Hr=jr;Hr.supportedVersions=[{version:11,factory:Fi},{version:12,factory:Li},{version:13,factory:Ui}];var{splitSignature:$1}=te,Qu=class extends ka{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Bn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=$1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Ip(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var $s=class{constructor(e,t){let a=t?.network||Bn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||yu[a],this.ipfs=new Ur(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Rr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Gp}=xt,Qs=class{constructor(e,t){this.config=new $s(e,t),this.contract=Bi.connect(t?.customNetworkAddress||pu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new ka({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ga({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Gp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Pe.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Hr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ns[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Ns[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ds[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:Y1}=te,B6=new ia.Web3Provider(window.ethereum),U6,F6,Rt,ln,Wp,X1=async()=>(await B6.send("eth_requestAccounts",[]),B6.getSigner()),Z1=async n=>{let e=await X1();U6=await e.getAddress(),F6=new Qs(e),Rt=await F6.getColony(n)},eg=async n=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Nr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},tg=async n=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(n);ln=F.from(n);let t=await Rt.ext.motions.getRemainingStakes(n),a=await Rt.ext.motions.getMotionState(n);return{...e,motionState:Ot[a],remainingStakes:t}},ng=async n=>{await Rt.ext.motions?.approveStake(Nr(n)).tx().mined()},ag=async n=>{await Rt.ext.motions?.stakeMotion(ln,1,n).tx().mined()},ig=async n=>{await Rt.ext.motions?.stakeMotion(ln,0,n).tx().mined()},rg=async()=>{await Rt.ext.motions?.submitVote(ln,1).tx().mined(),Wp=1},sg=async()=>{await Rt.ext.motions?.submitVote(ln,0).tx().mined(),Wp=0},og=async()=>{await Rt.ext.motions?.revealVote(ln,Wp).tx().mined()},ug=async()=>{await Rt.ext.motions?.finalizeMotion(ln).tx().mined()},L6=document.querySelector("#current-wallet-address"),Yu=document.querySelector("#address"),V6=document.querySelector("#stake_clny_amount"),zp=document.querySelector("#payment_amount"),Kp=document.querySelector("#stake_amount"),j6=document.querySelector("#button_create_motion"),H6=document.querySelector("#motion_id"),q6=document.querySelector("#button_connect"),G6=document.querySelector("#button_stake_clny"),z6=document.querySelector("#button_get_motion"),W6=document.querySelector("#button_stake_yay"),K6=document.querySelector("#button_stake_nay"),J6=document.querySelector("#button_vote_yay"),$6=document.querySelector("#button_vote_nay"),Q6=document.querySelector("#button_reveal"),Y6=document.querySelector("#button_finalize"),Jp=document.querySelector("#error"),X6=document.querySelector("#result");if(!Yu||!V6||!zp||!H6||!Kp||!Jp||!X6||!q6||!G6||!j6||!z6||!W6||!K6||!J6||!$6||!Q6||!Y6)throw new Error("Could not find all required HTML elements");var Bt=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},Aa=()=>{Jp.innerText=""},Ce=n=>{X6.innerText=n};q6.addEventListener("click",async()=>{Aa();let n=Yu.value;if(!Y1(n))return Bt(new Error("This is not a valid address"));Ce("Processing...");try{await Z1(Yu.value),L6&&(L6.innerText=U6),Ce(` +`)}`,g1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),Tp=(n,e)=>{let t=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})(n);if(t.success){if(t.data.version!==bp)throw new Error(`Invalid metadata version: ${t.data.version}`);if(e&&e!==t.data.name)throw new Error(`Wrong Metadata type. Given ${e}, got ${t.data.name}`);return t.data.name===Pe.Colony&&(t.data.data={...t.data.data,colonyTokens:t.data.data.colonyTokens||[],verifiedAddresses:t.data.data.verifiedAddresses||[],colonySafes:t.data.data.colonySafes||[]}),t.data}let a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Pe.Colony?g1(e):e,a=(i=>{let r=p=>{let f=M=>M.name==="colony"&&typeof M.data=="object"&&M.data!==null&&x(M.data)&&typeof M.version=="number",x=M=>typeof M.colonyName=="string"&&(M.colonyDisplayName===void 0||typeof M.colonyDisplayName=="string")&&(M.colonyAvatarHash===void 0||typeof M.colonyAvatarHash=="string")&&(M.colonyTokens===void 0||Array.isArray(M.colonyTokens)&&M.colonyTokens.every(J=>typeof J=="string"))&&(M.verifiedAddresses===void 0||Array.isArray(M.verifiedAddresses)&&M.verifiedAddresses.every(J=>typeof J=="string"))&&(M.isWhitelistActivated===void 0||typeof M.isWhitelistActivated=="boolean")&&(M.colonySafes===void 0||Array.isArray(M.colonySafes)&&M.colonySafes.every(J=>typeof J=="object"&&J!==null&&I(J))),I=M=>typeof M.chainId=="string"&&typeof M.contractAddress=="string"&&typeof M.moduleContractAddress=="string"&&typeof M.safeName=="string",_=M=>M.name==="domain"&&typeof M.data=="object"&&M.data!==null&&Array.isArray(M.data)===!1&&v(M.data)&&typeof M.version=="number",v=M=>(M.domainName===void 0||typeof M.domainName=="string")&&(M.domainColor===void 0||M.domainColor===0||M.domainColor===1||M.domainColor===2||M.domainColor===3||M.domainColor===4||M.domainColor===5||M.domainColor===6||M.domainColor===7||M.domainColor===8||M.domainColor===9||M.domainColor===10||M.domainColor===11||M.domainColor===12||M.domainColor===13||M.domainColor===14||M.domainColor===15)&&(M.domainPurpose===void 0||typeof M.domainPurpose=="string"),S=M=>M.name==="annotation"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.annotationMsg=="string"&&typeof M.version=="number",L=M=>M.name==="decision"&&typeof M.data=="object"&&M.data!==null&&O(M.data)&&typeof M.version=="number",O=M=>typeof M.title=="string"&&(M.description===void 0||typeof M.description=="string")&&typeof M.motionDomainId=="number",U=M=>M.name==="misc"&&typeof M.data=="object"&&M.data!==null&&typeof M.data.name=="string"&&typeof M.data.value=="string"&&typeof M.version=="number";return typeof p=="object"&&p!==null&&(M=>(()=>M.name==="colony"?f(M):M.name==="domain"?_(M):M.name==="annotation"?S(M):M.name==="decision"?L(M):M.name==="misc"?U(M):!1)())(p)},s=[],o=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!0)=>{let I=(T,R,N=!0)=>[T.name==="colony"||o(N,{path:R+".name",expected:'"colony"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"ColonyData",value:T.data}))&&_(T.data,R+".data",N)||o(N,{path:R+".data",expected:"ColonyData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),_=(T,R,N=!0)=>[typeof T.colonyName=="string"||o(N,{path:R+".colonyName",expected:"string",value:T.colonyName}),T.colonyDisplayName===void 0||typeof T.colonyDisplayName=="string"||o(N,{path:R+".colonyDisplayName",expected:"(string | undefined)",value:T.colonyDisplayName}),T.colonyAvatarHash===void 0||typeof T.colonyAvatarHash=="string"||o(N,{path:R+".colonyAvatarHash",expected:"(string | undefined)",value:T.colonyAvatarHash}),T.colonyTokens===void 0||(Array.isArray(T.colonyTokens)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}))&&T.colonyTokens.map((q,se)=>typeof q=="string"||o(N,{path:R+".colonyTokens["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".colonyTokens",expected:"(Array | undefined)",value:T.colonyTokens}),T.verifiedAddresses===void 0||(Array.isArray(T.verifiedAddresses)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}))&&T.verifiedAddresses.map((q,se)=>typeof q=="string"||o(N,{path:R+".verifiedAddresses["+se+"]",expected:"string",value:q})).every(q=>q)||o(N,{path:R+".verifiedAddresses",expected:"(Array | undefined)",value:T.verifiedAddresses}),T.isWhitelistActivated===void 0||typeof T.isWhitelistActivated=="boolean"||o(N,{path:R+".isWhitelistActivated",expected:"(boolean | undefined)",value:T.isWhitelistActivated}),T.colonySafes===void 0||(Array.isArray(T.colonySafes)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes}))&&T.colonySafes.map((q,se)=>(typeof q=="object"&&q!==null||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q}))&&v(q,R+".colonySafes["+se+"]",N)||o(N,{path:R+".colonySafes["+se+"]",expected:"SafeInfo",value:q})).every(q=>q)||o(N,{path:R+".colonySafes",expected:"(Array | undefined)",value:T.colonySafes})].every(q=>q),v=(T,R,N=!0)=>[typeof T.chainId=="string"||o(N,{path:R+".chainId",expected:"string",value:T.chainId}),typeof T.contractAddress=="string"||o(N,{path:R+".contractAddress",expected:"string",value:T.contractAddress}),typeof T.moduleContractAddress=="string"||o(N,{path:R+".moduleContractAddress",expected:"string",value:T.moduleContractAddress}),typeof T.safeName=="string"||o(N,{path:R+".safeName",expected:"string",value:T.safeName})].every(q=>q),S=(T,R,N=!0)=>[T.name==="domain"||o(N,{path:R+".name",expected:'"domain"',value:T.name}),(typeof T.data=="object"&&T.data!==null&&Array.isArray(T.data)===!1||o(N,{path:R+".data",expected:"DomainData",value:T.data}))&&L(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DomainData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),L=(T,R,N=!0)=>[T.domainName===void 0||typeof T.domainName=="string"||o(N,{path:R+".domainName",expected:"(string | undefined)",value:T.domainName}),T.domainColor===void 0||T.domainColor===0||T.domainColor===1||T.domainColor===2||T.domainColor===3||T.domainColor===4||T.domainColor===5||T.domainColor===6||T.domainColor===7||T.domainColor===8||T.domainColor===9||T.domainColor===10||T.domainColor===11||T.domainColor===12||T.domainColor===13||T.domainColor===14||T.domainColor===15||o(N,{path:R+".domainColor",expected:"(0 | 1 | 10 | 11 | 12 | 13 | 14 | 15 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined)",value:T.domainColor}),T.domainPurpose===void 0||typeof T.domainPurpose=="string"||o(N,{path:R+".domainPurpose",expected:"(string | undefined)",value:T.domainPurpose})].every(q=>q),O=(T,R,N=!0)=>[T.name==="annotation"||o(N,{path:R+".name",expected:'"annotation"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}))&&U(T.data,R+".data",N)||o(N,{path:R+".data",expected:"AnnotationData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),U=(T,R,N=!0)=>[typeof T.annotationMsg=="string"||o(N,{path:R+".annotationMsg",expected:"string",value:T.annotationMsg})].every(q=>q),H=(T,R,N=!0)=>[T.name==="decision"||o(N,{path:R+".name",expected:'"decision"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"DecisionData",value:T.data}))&&M(T.data,R+".data",N)||o(N,{path:R+".data",expected:"DecisionData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),M=(T,R,N=!0)=>[typeof T.title=="string"||o(N,{path:R+".title",expected:"string",value:T.title}),T.description===void 0||typeof T.description=="string"||o(N,{path:R+".description",expected:"(string | undefined)",value:T.description}),typeof T.motionDomainId=="number"||o(N,{path:R+".motionDomainId",expected:"number",value:T.motionDomainId})].every(q=>q),J=(T,R,N=!0)=>[T.name==="misc"||o(N,{path:R+".name",expected:'"misc"',value:T.name}),(typeof T.data=="object"&&T.data!==null||o(N,{path:R+".data",expected:"MiscData",value:T.data}))&&$(T.data,R+".data",N)||o(N,{path:R+".data",expected:"MiscData",value:T.data}),typeof T.version=="number"||o(N,{path:R+".version",expected:"number",value:T.version})].every(q=>q),$=(T,R,N=!0)=>[typeof T.name=="string"||o(N,{path:R+".name",expected:"string",value:T.name}),typeof T.value=="string"||o(N,{path:R+".value",expected:"string",value:T.value})].every(q=>q),de=(T,R,N=!0)=>(()=>T.name==="colony"?I(T,R,N):T.name==="domain"?S(T,R,N):T.name==="annotation"?O(T,R,N):T.name==="decision"?H(T,R,N):T.name==="misc"?J(T,R,N):o(N,{path:R,expected:"(ColonyMetadata | DomainMetadata | AnnotationMetadata | DecisionMetadata | MiscMetadata)",value:T}))();return(typeof p=="object"&&p!==null||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p}))&&de(p,f+"",!0)||o(!0,{path:f+"",expected:"(AnnotationMetadata | ColonyMetadata | DecisionMetadata | DomainMetadata | MiscMetadata)",value:p})})(i,"$input",!0);let l=s.length===0;return{success:l,errors:s,data:l?i:void 0}})({name:n,data:t,version:bp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.data};var vp=class{CLOUDFLARE_GATEWAY_ENDPOINT="https://cloudflare-ipfs.com/ipfs";name="CLOUDFLARE";getIpfsUrl(e){return`${this.CLOUDFLARE_GATEWAY_ENDPOINT}/${e}`}uploadJson(){throw new Error("The default Cloudflare IPFS adapter is readonly only. Please use another adapter to upload and pin files.")}},wp=vp;var _p=(0,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),qs={[Pe.Annotation]:"Annotation(address,bytes32,string)",[Pe.Colony]:"ColonyMetadata(address,string)",[Pe.Decision]:"Annotation(address,bytes32,string)",[Pe.Domain]:"DomainMetadata(address,uint256,string)",[Pe.Misc]:"",[Pe.DEFAULT]:""},Ur=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(qs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await _p(a)).json();return Tp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await _p(a)).json(),s=Object.entries(qs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return Tp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await _p(t);try{return await a.json()}catch(i){throw new Error(`Could not parse IPFS metadata. Original error: ${i.message}`)}}async uploadMetadata(e,t){let a=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var UE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var kp=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};xe(kn,"abi",kp);var Ap=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],An=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};xe(An,"abi",Ap);var Ep=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(Ni,"abi",Ep);var Ku=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"guy",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"guy",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],N6="0x60c060405234801561001057600080fd5b5060405161205938038061205983398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae7610572600039600081816102e10152610f890152600061029b0152611ae76000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b2565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115da565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116c1565b610672565b34801561020057600080fd5b5061021461020f366004611735565b61085b565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611752565b6108de565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115da565b610952565b34801561032f57600080fd5b5061021461033e366004611793565b610a41565b34801561034f57600080fd5b506101d161035e3660046117ac565b610a55565b34801561036f57600080fd5b5061022761037e366004611735565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611735565b610ba9565b3480156103c557600080fd5b506102276103d4366004611735565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c1a565b34801561044857600080fd5b506102146104573660046115da565b610c27565b34801561046857600080fd5b50610214610477366004611793565b610e1e565b34801561048857600080fd5b50610214610e56565b34801561049d57600080fd5b506101d16104ac3660046115da565b610e89565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611833565b610ea4565b34801561051757600080fd5b506102276105263660046118a2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118db565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118db565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611193565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611193565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a55565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611236565b600080306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a60405160200161074f93929190611915565b60408051601f19818403018152908290526107699161194e565b6000604051808303816000865af19150503d80600081146107a6576040519150601f19603f3d011682016040523d82523d6000602084013e6107ab565b606091505b50915091508161080e5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88610838611193565b896040516108489392919061196a565b60405180910390a1979650505050505050565b610878610866611193565b6000356001600160e01b031916611262565b6108945760405162461bcd60e51b81526004016106fb9061199f565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093f576108f7610866611193565b61093f5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094a84848461133d565b949350505050565b61095d610866611193565b6109795760405162461bcd60e51b81526004016106fb9061199f565b6001600160a01b038216600090815260016020526040812080548392906109a19084906119e3565b92505081905550806000808282546109b991906119e3565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a52610a4c611193565b82610c27565b50565b600080610ad288308989604051602001610a7294939291906119f6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b2a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8d5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb4610866611193565b610bd05760405162461bcd60e51b81526004016106fb9061199f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118db565b610c2f611193565b6001600160a01b0316826001600160a01b031614610d2f576001600160a01b03821660009081526002602052604081208291610c69611193565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd85760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cfa611193565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d299190611a3c565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d975760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbf908490611a3c565b9250508190555080600080828254610dd79190611a3c565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e29610866611193565b610e455760405162461bcd60e51b81526004016106fb9061199f565b610a52610e50611193565b82610952565b610e61610866611193565b610e7d5760405162461bcd60e51b81526004016106fb9061199f565b6007805460ff19169055565b6000610e9d610e96611193565b84846108de565b9392505050565b60075460ff1615610f0257610eba610866611193565b610f025760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f525760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fdb83611a4f565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103f93929190611a68565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110e05750886001600160a01b0316816001600160a01b0316145b61112c5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a6575060348110155b1561122f57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121e5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125a83611a4f565b919050555050565b6000306001600160a01b0384160361127c5750600161066c565b6004546001600160a01b039081169084160361129a5750600161066c565b6003546001600160a01b03166112b25750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611a8f565b905061066c565b6000611347611193565b6001600160a01b0316846001600160a01b031614611447576001600160a01b03841660009081526002602052604081208391611381611193565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113f05760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611412611193565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114419190611a3c565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114af5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d7908490611a3c565b90915550506001600160a01b038316600090815260016020526040812080548492906115049084906119e3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155091815260200190565b60405180910390a35060019392505050565b60005b8381101561157d578181015183820152602001611565565b50506000910152565b6000815180845261159e816020860160208601611562565b601f01601f19169290920160200192915050565b602081526000610e9d6020830184611586565b6001600160a01b0381168114610a5257600080fd5b600080604083850312156115ed57600080fd5b82356115f8816115c5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162d57600080fd5b813567ffffffffffffffff81111561164757611647611606565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167657611676611606565b60405281815283820160200185101561168e57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116bc57600080fd5b919050565b600080600080600060a086880312156116d957600080fd5b85356116e4816115c5565b9450602086013567ffffffffffffffff81111561170057600080fd5b61170c8882890161161c565b9450506040860135925060608601359150611729608087016116ab565b90509295509295909350565b60006020828403121561174757600080fd5b8135610e9d816115c5565b60008060006060848603121561176757600080fd5b8335611772816115c5565b92506020840135611782816115c5565b929592945050506040919091013590565b6000602082840312156117a557600080fd5b5035919050565b600080600080600080600060e0888a0312156117c757600080fd5b87356117d2816115c5565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fc57600080fd5b6118088a828b0161161c565b9450506080880135925060a0880135915061182560c089016116ab565b905092959891949750929550565b600080600080600080600060e0888a03121561184e57600080fd5b8735611859816115c5565b96506020880135611869816115c5565b95506040880135945060608801359350611885608089016116ab565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b557600080fd5b82356118c0816115c5565b915060208301356118d0816115c5565b809150509250929050565b600181811c908216806118ef57607f821691505b60208210810361190f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611927818460208901611562565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b60008251611960818460208701611562565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199690830184611586565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cd565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2c816054850160208701611562565b9190910160540195945050505050565b8181038181111561066c5761066c6119cd565b600060018201611a6157611a616119cd565b5060010190565b60008451611a7a818460208901611562565b91909101928352506020820152604001919050565b600060208284031215611aa157600080fd5b81518015158114610e9d57600080fdfea264697066735822122021149fb1eb3a6fee54e30e02c3ea4bf39cdbab7d0ed050eae5e133de8304ae3864736f6c634300081b0033",_1=n=>n.length>1,Fn=class extends gi{constructor(...e){_1(e)?super(...e):super(Ku,N6,e[0])}deploy(e,t,a,i){return super.deploy(e,t,a,i||{})}getDeployTransaction(e,t,a,i){return super.getDeployTransaction(e,t,a,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new te.Interface(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Fn,"bytecode",N6),xe(Fn,"abi",Ku);var Mp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"}],name:"ColonyNetworkSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"StakeTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"lockedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"lockCount",type:"uint256"}],name:"TokenLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"approvedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeobligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"obligatedBy",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenObligated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"lockId",type:"uint256"}],name:"UserTokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UserTokenWithdrawn",type:"event"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deposit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"depositFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getApproval",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getTotalLockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"getTotalObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"}],name:"getUserLock",outputs:[{components:[{internalType:"uint256",name:"lockCount",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"DEPRECATED_timestamp",type:"uint256"},{internalType:"uint256",name:"pendingBalance",type:"uint256"}],internalType:"struct TokenLockingDataTypes.Lock",name:"lock",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"lockToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"bool",name:"_force",type:"bool"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bool",name:"_force",type:"bool"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],Di=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Di,"abi",Mp);var Oi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Oi||(Oi={}));var Ln;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Ln||(Ln={}));var{AddressZero:M1}=xt;async function C1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(n,e)=>{let t,a=!0,i=!0;t=Fn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await C1(t)}catch{a=!1}try{await t.nonces(M1)}catch{i=!1}return a?t.tokenClientType=Ln.Colony:i?(t=An.connect(n,e),t.tokenClientType=Ln.Erc2612):(t=kn.connect(n,e),t.tokenClientType=Ln.Erc20),t.clientType=Oi.TokenClient,t},Cp=I1;var S1=(n,e)=>{let t=Di.connect(n,e);return t.clientType=Oi.TokenLockingClient,t},Ip=S1;var{AddressZero:Sp}=xt,R1=kn.connect(Sp,new ia.BaseProvider(3656691)).interface,P1=Ni.connect(Sp,new ia.BaseProvider(3656691)).interface,N1=An.connect(Sp,new ia.BaseProvider(3656691)).interface;var Rp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Gs.abi=Rp;var Pp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],zs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};zs.abi=Pp;var Np=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"auction",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"colonyId",type:"uint256"},{indexed:!0,internalType:"address",name:"colonyAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"ColonyLabelRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyNetworkInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"ColonyVersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionAddedToNetwork",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"ExtensionDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionInstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"}],name:"ExtensionUninstalled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"extensionId",type:"bytes32"},{indexed:!0,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ExtensionUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"metaColony",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"rootSkillId",type:"uint256"}],name:"MetaColonyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miningCycleResolver",type:"address"}],name:"MiningCycleResolverSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feeInverse",type:"uint256"}],name:"NetworkFeeInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"ens",type:"address"},{indexed:!1,internalType:"bytes32",name:"rootNode",type:"bytes32"}],name:"RegistrarInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"miner",type:"address"},{indexed:!1,internalType:"uint256",name:"tokensLost",type:"uint256"}],name:"ReputationMinerPenalised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"nLeaves",type:"uint256"}],name:"ReputationMiningCycleComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"inactiveReputationMiningCycle",type:"address"}],name:"ReputationMiningInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ReputationMiningRewardSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"newHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newNLeaves",type:"uint256"},{indexed:!1,internalType:"address[]",name:"stakers",type:"address[]"},{indexed:!1,internalType:"uint256",name:"reward",type:"uint256"}],name:"ReputationRootHashSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentSkillId",type:"uint256"}],name:"SkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAuthorityAddress",type:"address"}],name:"TokenAuthorityDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tokenLocking",type:"address"}],name:"TokenLockingAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"bool",name:"status",type:"bool"}],name:"TokenWhitelisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bytes32",name:"label",type:"bytes32"}],name:"UserLabelRegistered",type:"event"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],name:"addSkill",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"appendReputationUpdateLog",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_timeStaked",type:"uint256"},{internalType:"uint256",name:"_submissonIndex",type:"uint256"}],name:"calculateMinerWeight",outputs:[{internalType:"uint256",name:"_minerWeight",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"},{internalType:"bool",name:"_useExtensionManager",type:"bool"}],name:"createColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"},{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_metadata",type:"string"}],name:"createColonyForFrontend",outputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"colony",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_colony",type:"address"},{internalType:"address[]",name:"_allowedToTransfer",type:"address[]"}],name:"deployTokenAuthority",outputs:[{internalType:"address",name:"_tokenAuthority",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"uint8",name:"_decimals",type:"uint8"}],name:"deployTokenViaNetwork",outputs:[{internalType:"address",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateSkill",outputs:[{internalType:"bool",name:"_changed",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"getChildSkillId",outputs:[{internalType:"uint256",name:"_childSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_colony",type:"address"}],name:"getExtensionInstallation",outputs:[{internalType:"address",name:"_installation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"getExtensionResolver",outputs:[{internalType:"address",name:"_resolver",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMiningStake",outputs:[{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.MiningStake",name:"_info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_parentSkillIndex",type:"uint256"}],name:"getParentSkillId",outputs:[{internalType:"uint256",name:"_parentSkillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"getProfileDBAddress",outputs:[{internalType:"string",name:"_orbitdb",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"getReplacementReputationUpdateLogEntry",outputs:[{components:[{internalType:"address",name:"user",type:"address"},{internalType:"int256",name:"amount",type:"int256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"address",name:"colony",type:"address"},{internalType:"uint128",name:"nUpdates",type:"uint128"},{internalType:"uint128",name:"nPreviousUpdates",type:"uint128"}],internalType:"struct ColonyNetworkDataTypes.ReputationLogEntry",name:"_reputationLogEntry",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"}],name:"getReplacementReputationUpdateLogsExist",outputs:[{internalType:"bool",name:"_exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHash",outputs:[{internalType:"bytes32",name:"rootHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNLeaves",outputs:[{internalType:"uint256",name:"nLeaves",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationRootHashNNodes",outputs:[{internalType:"uint256",name:"nNodes",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"getSkill",outputs:[{components:[{internalType:"uint128",name:"nParents",type:"uint128"},{internalType:"uint128",name:"nChildren",type:"uint128"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"uint256[]",name:"children",type:"uint256[]"},{internalType:"bool",name:"DEPRECATED_globalSkill",type:"bool"},{internalType:"bool",name:"DEPRECATED_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_resolver",type:"address"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"lookupRegisteredENSDomain",outputs:[{internalType:"string",name:"_domain",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_colonyName",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"},{internalType:"bool",name:"_allowed",type:"bool"}],name:"setMiningDelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_status",type:"bool"}],name:"setPayoutWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_reputationMiningCycle",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint128",name:"_nUpdates",type:"uint128"},{internalType:"uint128",name:"_nPreviousUpdates",type:"uint128"}],name:"setReplacementReputationUpdateLogEntry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_newHash",type:"bytes32"},{internalType:"uint256",name:"_newNLeaves",type:"uint256"},{internalType:"address[]",name:"_stakers",type:"address[]"}],name:"setReputationRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_ens",type:"address"},{internalType:"bytes32",name:"_rootNode",type:"bytes32"}],name:"setupRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_orbitdb",type:"string"}],name:"updateUserOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Bi.abi=Np;var ka=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}async getMined(e){let t=await e.wait();return this.getEventData(t)}async getEventData(e){if(this.eventData){let t=await this.eventData(e);if(this.txConfig?.metadataType&&t.metadata){let a=this.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,qs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:O1,solidityKeccak256:B1,splitSignature:F1}=te,Ga=class extends ka{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Bn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=B1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=O1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=F1(f),v={target:t,payload:e,userAddress:s,r:x,s:I,v:_};return this.broadcastMetaTx(v)}async getMetaTx(){let e=await this.getArgs(),t=this.contract.interface.encodeFunctionData(this.method,e);return this.sendMetaTransaction(t,this.contract.address)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}metaTx(){return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var ne=(n,e)=>{if("events"in e&&e.events){let t=e.events.find(a=>a.event===n);if(t?.args)return t.args}else if("parsedLogs"in e&&e.parsedLogs){let t=e.parsedLogs.find(a=>a.name===n);if(t?.args)return t.args}},Ju=(n,e,t)=>{let a;"events"in e&&e.events?a=e.events:"logs"in e&&e.logs?a=e.logs:a=[];for(let i=0;i{let a=await this.getMotionTx(t);return[a,this.getMotionMined.bind(this,a)]},mined:async()=>{let a=await this.getMotionTx(t);return this.getMotionMined(a)},encode:async()=>{let[a]=await this.getEncodedMotionTx(t);return a}}}metaMotion(t=_e.RootDomain){return{send:async()=>{let a=await this.getMetaMotionTx(t);return[a,this.getMetaMotionMinded.bind(this,a)]},mined:async()=>{let a=await this.getMetaMotionTx(t);return this.getMetaMotionMinded(a)}}}};var Dp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Fi.abi=Dp;var Op=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Li=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Li.abi=Op;var Bp=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"bytes32",name:"txHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"Annotation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"},{indexed:!1,internalType:"int256",name:"amount",type:"int256"}],name:"ArbitraryReputationUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bool",name:"success",type:"bool"}],name:"ArbitraryTransaction",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address[]",name:"users",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"amounts",type:"int256[]"}],name:"ColonyBootstrapped",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payoutRemainder",type:"uint256"}],name:"ColonyFundsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fromPot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"toPot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyFundsMovedBetweenFundingPots",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"colonyNetwork",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"}],name:"ColonyInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ColonyMetadataDelta",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardInverse",type:"uint256"}],name:"ColonyRewardInverseSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint8",name:"role",type:"uint8"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"ColonyRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"oldVersion",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newVersion",type:"uint256"}],name:"ColonyUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"domainId",type:"uint256"}],name:"DomainAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"DomainDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"DomainMetadata",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"uint256",name:"claimDelay",type:"uint256"}],name:"ExpenditureClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],name:"ExpenditureGlobalClaimDelaySet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"}],name:"ExpenditureLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!1,internalType:"string",name:"metadata",type:"string"}],name:"ExpenditureMetadataSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"int256",name:"payoutModifier",type:"int256"}],name:"ExpenditurePayoutModifierSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExpenditurePayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"address",name:"recipient",type:"address"}],name:"ExpenditureRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"ExpenditureSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"storageSlot",type:"uint256"},{indexed:!1,internalType:"bool[]",name:"mask",type:"bool[]"},{indexed:!1,internalType:"bytes32[]",name:"keys",type:"bytes32[]"},{indexed:!1,internalType:"bytes32",name:"value",type:"bytes32"}],name:"ExpenditureStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"expenditureId",type:"uint256"},{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"ExpenditureTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"fundingPotId",type:"uint256"}],name:"FundingPotAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"}],name:"LocalSkillAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"localSkillId",type:"uint256"},{indexed:!1,internalType:"bool",name:"deprecated",type:"bool"}],name:"LocalSkillDeprecated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"}],name:"PaymentFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PaymentPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"address",name:"recipient",type:"address"}],name:"PaymentRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"paymentId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"PaymentSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"fundingPotId",type:"uint256"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExitApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"}],name:"RecoveryModeExited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"setTo",type:"bool"}],name:"RecoveryRoleSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"slot",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"fromValue",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"toValue",type:"bytes32"}],name:"RecoveryStorageSlotSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"},{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rewardRemainder",type:"uint256"}],name:"RewardPayoutClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardPayoutId",type:"uint256"}],name:"RewardPayoutCycleStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"specificationHash",type:"bytes32"}],name:"TaskBriefSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"reviewerAddresses",type:"address[]"}],name:"TaskChangedViaSignatures",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"deliverableHash",type:"bytes32"}],name:"TaskDeliverableSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dueDate",type:"uint256"}],name:"TaskDueDateSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"}],name:"TaskFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TaskPayoutSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"TaskRoleUserSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"skillId",type:"uint256"}],name:"TaskSkillSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!0,internalType:"uint256",name:"taskId",type:"uint256"},{indexed:!1,internalType:"enum ColonyDataTypes.TaskRole",name:"role",type:"uint8"},{indexed:!1,internalType:"uint8",name:"rating",type:"uint8"}],name:"TaskWorkRatingRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"}],name:"TokenUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensMinted",type:"event"},{inputs:[],name:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"enterRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"numRecoveryRoles",outputs:[{internalType:"uint64",name:"numRoles",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setStorageSlotRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"authority",outputs:[{internalType:"address",name:"colonyAuthority",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"colonyOwner",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"colonyVersion",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"colonyNetwork",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"address",name:"tokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_targets",type:"address[]"},{internalType:"bytes[]",name:"_actions",type:"bytes[]"},{internalType:"bool",name:"_strict",type:"bool"}],name:"makeArbitraryTransactions",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_target",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"}],name:"makeSingleArbitraryTransaction",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_txHash",type:"bytes32"},{internalType:"string",name:"_metadata",type:"string"}],name:"annotateTransaction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setRootRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArbitrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setArchitectureRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setFundingRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_setTo",type:"bool"}],name:"setAdministrationRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bytes32",name:"_roles",type:"bytes32"}],name:"setUserRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"}],name:"hasUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"enum ColonyDataTypes.ColonyRole",name:"_role",type:"uint8"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"hasInheritedUserRole",outputs:[{internalType:"bool",name:"hasRole",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_childDomainId",type:"uint256"}],name:"userCanSetRoles",outputs:[{internalType:"bool",name:"canSet",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domain",type:"uint256"}],name:"getUserRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitDomainReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"}],name:"emitSkillReputationPenalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetworkAddress",type:"address"},{internalType:"address",name:"_token",type:"address"}],name:"initialiseColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadata",type:"string"}],name:"editColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_metadataDelta",type:"string"}],name:"editColonyByDelta",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_users",type:"address[]"},{internalType:"int256[]",name:"_amount",type:"int256[]"}],name:"bootstrapColony",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_guy",type:"address"},{internalType:"uint256",name:"_wad",type:"uint256"}],name:"mintTokensFor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"lockToken",outputs:[{internalType:"uint256",name:"timesLocked",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"lockId",type:"uint256"}],name:"unlockTokenForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"colonyName",type:"string"},{internalType:"string",name:"orbitdb",type:"string"}],name:"registerColonyLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"orbitdb",type:"string"}],name:"updateColonyOrbitDB",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"version",type:"uint256"}],name:"installExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"uint256",name:"newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"localSkillId",type:"uint256"},{internalType:"bool",name:"deprecated",type:"bool"}],name:"deprecateLocalSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRootLocalSkill",outputs:[{internalType:"uint256",name:"rootLocalSkill",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_parentDomainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"addDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"editDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateDomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getDomain",outputs:[{components:[{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"}],internalType:"struct ColonyDataTypes.Domain",name:"domain",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"verifyReputationProof",outputs:[{internalType:"bool",name:"isValid",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_globalClaimDelay",type:"uint256"}],name:"setDefaultGlobalClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"makeExpenditure",outputs:[{internalType:"uint256",name:"expenditureId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_newOwner",type:"address"}],name:"transferExpenditureViaArbitration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"lockExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeExpenditure",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"string",name:"_metadata",type:"string"}],name:"setExpenditureMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setExpenditureRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"}],name:"setExpenditureRecipients",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"}],name:"setExpenditurePayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setExpenditureSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"}],name:"setExpenditureSkills",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"uint256",name:"_claimDelay",type:"uint256"}],name:"setExpenditureClaimDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"}],name:"setExpenditureClaimDelays",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_slots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"}],name:"setExpenditurePayoutModifiers",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256[]",name:"_recipientSlots",type:"uint256[]"},{internalType:"address payable[]",name:"_recipients",type:"address[]"},{internalType:"uint256[]",name:"_skillIdSlots",type:"uint256[]"},{internalType:"uint256[]",name:"_skillIds",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelaySlots",type:"uint256[]"},{internalType:"uint256[]",name:"_claimDelays",type:"uint256[]"},{internalType:"uint256[]",name:"_payoutModifierSlots",type:"uint256[]"},{internalType:"int256[]",name:"_payoutModifiers",type:"int256[]"},{internalType:"address[]",name:"_payoutTokens",type:"address[]"},{internalType:"uint256[][]",name:"_payoutSlots",type:"uint256[][]"},{internalType:"uint256[][]",name:"_payoutValues",type:"uint256[][]"}],name:"setExpenditureValues",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_storageSlot",type:"uint256"},{internalType:"bool[]",name:"_mask",type:"bool[]"},{internalType:"bytes32[]",name:"_keys",type:"bytes32[]"},{internalType:"bytes32",name:"_value",type:"bytes32"}],name:"setExpenditureState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimExpenditurePayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getExpenditureCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getExpenditure",outputs:[{components:[{internalType:"enum ColonyDataTypes.ExpenditureStatus",name:"status",type:"uint8"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"finalizedTimestamp",type:"uint256"},{internalType:"uint256",name:"globalClaimDelay",type:"uint256"}],internalType:"struct ColonyDataTypes.Expenditure",name:"expenditure",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"}],name:"getExpenditureSlot",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"claimDelay",type:"uint256"},{internalType:"int256",name:"payoutModifier",type:"int256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.ExpenditureSlot",name:"expenditureSlot",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_slot",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getExpenditureSlotPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPayment",outputs:[{internalType:"uint256",name:"paymentId",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_recipient",type:"address"}],name:"setPaymentRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setPaymentSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setPaymentPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getPayment",outputs:[{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skills",type:"uint256[]"}],internalType:"struct ColonyDataTypes.Payment",name:"payment",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"claimPayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getPaymentCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"makeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTaskCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskChangeNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"_sigV",type:"uint8[]"},{internalType:"bytes32[]",name:"_sigR",type:"bytes32[]"},{internalType:"bytes32[]",name:"_sigS",type:"bytes32[]"},{internalType:"uint8[]",name:"_mode",type:"uint8[]"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeTaskRoleAssignment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"uint8",name:"_rating",type:"uint8"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"revealTaskWorkRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"generateSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTaskWorkRatingSecretsInfo",outputs:[{internalType:"uint256",name:"nSecrets",type:"uint256"},{internalType:"uint256",name:"lastSubmittedAt",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskWorkRatingSecret",outputs:[{internalType:"bytes32",name:"secret",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"}],name:"setTaskManagerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address payable",name:"_user",type:"address"}],name:"setTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskEvaluatorRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"removeTaskWorkerRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"setTaskSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_specificationHash",type:"bytes32"}],name:"setTaskBrief",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_dueDate",type:"uint256"}],name:"setTaskDueDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"}],name:"submitTaskDeliverable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"bytes32",name:"_deliverableHash",type:"bytes32"},{internalType:"bytes32",name:"_ratingSecret",type:"bytes32"}],name:"submitTaskDeliverableAndRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"finalizeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"cancelTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"completeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getTask",outputs:[{internalType:"bytes32",name:"specificationHash",type:"bytes32"},{internalType:"bytes32",name:"deliverableHash",type:"bytes32"},{internalType:"enum ColonyDataTypes.TaskStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"dueDate",type:"uint256"},{internalType:"uint256",name:"fundingPotId",type:"uint256"},{internalType:"uint256",name:"completionTimestamp",type:"uint256"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256[]",name:"skillIds",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"}],name:"getTaskRole",outputs:[{components:[{internalType:"address payable",name:"user",type:"address"},{internalType:"bool",name:"rateFail",type:"bool"},{internalType:"enum ColonyDataTypes.TaskRatings",name:"rating",type:"uint8"}],internalType:"struct ColonyDataTypes.Role",name:"role",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_rewardInverse",type:"uint256"}],name:"setRewardInverse",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getRewardInverse",outputs:[{internalType:"uint256",name:"rewardInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"getTaskPayout",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskManagerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskEvaluatorPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"setTaskWorkerPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_managerAmount",type:"uint256"},{internalType:"uint256",name:"_evaluatorAmount",type:"uint256"},{internalType:"uint256",name:"_workerAmount",type:"uint256"}],name:"setAllTaskPayouts",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint8",name:"_role",type:"uint8"},{internalType:"address",name:"_token",type:"address"}],name:"claimTaskPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"startNextRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"},{internalType:"uint256[7]",name:"_squareRoots",type:"uint256[7]"},{internalType:"bytes",name:"key",type:"bytes"},{internalType:"bytes",name:"value",type:"bytes"},{internalType:"uint256",name:"branchMask",type:"uint256"},{internalType:"bytes32[]",name:"siblings",type:"bytes32[]"}],name:"claimRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"getRewardPayoutInfo",outputs:[{components:[{internalType:"bytes32",name:"reputationState",type:"bytes32"},{internalType:"uint256",name:"colonyWideReputation",type:"uint256"},{internalType:"uint256",name:"totalTokens",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"uint256",name:"blockTimestamp",type:"uint256"},{internalType:"uint256",name:"amountRemaining",type:"uint256"},{internalType:"bool",name:"finalized",type:"bool"}],internalType:"struct ColonyDataTypes.RewardPayoutCycle",name:"rewardPayoutCycle",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_payoutId",type:"uint256"}],name:"finalizeRewardPayout",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getFundingPot",outputs:[{internalType:"enum ColonyDataTypes.FundingPotAssociatedType",name:"associatedType",type:"uint8"},{internalType:"uint256",name:"associatedTypeId",type:"uint256"},{internalType:"uint256",name:"payoutsWeCannotMake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFundingPotCount",outputs:[{internalType:"uint256",name:"count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_potId",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"getFundingPotPayout",outputs:[{internalType:"uint256",name:"payout",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_fromChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_toChildSkillIndex",type:"uint256"},{internalType:"uint256",name:"_fromPot",type:"uint256"},{internalType:"uint256",name:"_toPot",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"moveFundsBetweenPots",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"claimColonyFunds",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"getNonRewardPotsTotal",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_approvee",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"deobligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"}],name:"transferStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getApproval",outputs:[{internalType:"uint256",name:"approval",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"address",name:"_obligator",type:"address"},{internalType:"uint256",name:"_domainId",type:"uint256"}],name:"getObligation",outputs:[{internalType:"uint256",name:"obligation",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fundingPotId",type:"uint256"}],name:"getDomainFromFundingPot",outputs:[{internalType:"uint256",name:"domainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"updateApprovalAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"getTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTotalTokenApproval",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"}],Ui=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ui.abi=Bp;var Fp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Vi=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Vi.abi=Fp;var Lp=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],ji=class{static createInterface(){return new te.Interface(Lp)}static connect(e,t){return new oe(e,Lp,t)}};ji.abi=Lp;var Up=[{anonymous:!1,inputs:[],name:"ExtensionInitialised",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authority",type:"address"}],name:"LogSetAuthority",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"}],name:"LogSetOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"functionSignature",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{indexed:!1,internalType:"uint256",name:"fundamentalId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"nPayouts",type:"uint256"}],name:"OneTxPaymentMade",type:"event"},{inputs:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"},{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"bytes",name:"_payload",type:"bytes"},{internalType:"bytes32",name:"_sigR",type:"bytes32"},{internalType:"bytes32",name:"_sigS",type:"bytes32"},{internalType:"uint8",name:"_sigV",type:"uint8"}],name:"verify",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"_identifier",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"_roles",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePayment",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_callerPermissionDomainId",type:"uint256"},{internalType:"uint256",name:"_callerChildSkillIndex",type:"uint256"},{internalType:"address payable[]",name:"_workers",type:"address[]"},{internalType:"address[]",name:"_tokens",type:"address[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"makePaymentFundedFromDomain",outputs:[],stateMutability:"nonpayable",type:"function"}],Hi=class{static createInterface(){return new te.Interface(Up)}static connect(e,t){return new oe(e,Up,t)}};Hi.abi=Up;var{AddressZero:G1}=xt,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(Un.extensionType),e.address);if(t===G1)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(Un.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Un.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Un(e,r,a)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.oneTxPaymentContract=t,this.version=a}getInternalVotingReputationContract(){return this.oneTxPaymentContract}pay(e,t,a,i){let r=[].concat(e),s=a||_e.RootDomain,o=i?[].concat(i):Array(r.length).fill(this.colony.token.address),l=[].concat(t);if(r.length!==l.length)throw new Error("recipient and amount arrays need to have the same size");if(o.length!==l.length)throw new Error("amount and tokenAddress arrays need to have the same size");let p=Array.from(r.keys());p.sort((_,v)=>r[_].localeCompare(r[v]));let f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding],this.oneTxPaymentContract.address),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[wt.Administration,wt.Funding]);return[_,v,S,L,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},za=Un;za.supportedVersions=[{version:3,factory:Vi},{version:4,factory:ji},{version:5,factory:Hi}],za.extensionType=Ae.OneTxPayment;var Vn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.config.signerOrProvider):this.tokenClient=t,this.address=this.tokenClient.address,this.colonyNetwork=e}getInternalTokenClient(){return this.tokenClient}async name(){return this.tokenClient.name()}async symbol(){return this.tokenClient.symbol()}async decimals(){return this.tokenClient.decimals()}async totalSupply(){return this.tokenClient.totalSupply()}async balanceOf(e){return this.tokenClient.balanceOf(e)}async allowance(e,t){return this.tokenClient.allowance(e,t)}transfer(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"transfer",[e,t],async a=>({...ne("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ne("Transfer",i)}))}approve(e,t){return this.colonyNetwork.createTxCreator(this.tokenClient,"approve",async()=>{let a=await this.colonyNetwork.getTokenLocking();return[t||a.address,e]},async a=>({...ne("Approval",a)}))}};var Ws=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Fn.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}setAuthority(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setAuthority",[t],async a=>({...ne("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ne("LogSetOwner",a)}))}};var Ks=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=An.connect(a,t.config.signerOrProvider):this.tokenClient=a,this.address=this.tokenClient.address,this.colonyNetwork=t}getInternalTokenClient(){return this.tokenClient}permit(t,a){return this.colonyNetwork.createEip2612TxCreator(this.tokenClient,"permit",async()=>{let i=await this.colonyNetwork.getTokenLocking();return[a||i.address,t]},async i=>({...ne("Approval",i)}))}};var D6=async(n,e)=>{let t=await Cp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Ln.Colony:return new Ws(n,t);case Ln.Erc20:return new Vn(n,t);case Ln.Erc2612:return new Ks(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Vp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createRootMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createDomainMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],qi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};qi.abi=Vp;var jp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],Gi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Gi.abi=jp;var Hp=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"address payable",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"payload",type:"bytes"}],name:"MetaTransactionExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"}],name:"MotionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"address",name:"escalator",type:"address"},{indexed:!0,internalType:"uint256",name:"domainId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"newDomainId",type:"uint256"}],name:"MotionEscalated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"eventIndex",type:"uint256"}],name:"MotionEventSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!1,internalType:"bytes",name:"action",type:"bytes"},{indexed:!1,internalType:"bool",name:"executed",type:"bool"}],name:"MotionFinalized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionRewardClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"staker",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MotionStaked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"uint256",name:"vote",type:"uint256"}],name:"MotionVoteRevealed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"motionId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"}],name:"MotionVoteSubmitted",type:"event"},{inputs:[{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"},{internalType:"bytes",name:"payload",type:"bytes"},{internalType:"bytes32",name:"sigR",type:"bytes32"},{internalType:"bytes32",name:"sigS",type:"bytes32"},{internalType:"uint8",name:"sigV",type:"uint8"}],name:"executeMetaTransaction",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"finishUpgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColony",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDeprecated",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"identifier",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"}],name:"install",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"_totalStakeFraction",type:"uint256"},{internalType:"uint256",name:"_voterRewardFraction",type:"uint256"},{internalType:"uint256",name:"_userMinStakeFraction",type:"uint256"},{internalType:"uint256",name:"_maxVoteFraction",type:"uint256"},{internalType:"uint256",name:"_stakePeriod",type:"uint256"},{internalType:"uint256",name:"_submitPeriod",type:"uint256"},{internalType:"uint256",name:"_revealPeriod",type:"uint256"},{internalType:"uint256",name:"_escalationPeriod",type:"uint256"}],name:"initialise",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_domainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_altTarget",type:"address"},{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"createMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"stakeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_voteSecret",type:"bytes32"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"submitVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"uint256",name:"_vote",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"revealVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_newDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"bytes",name:"_key",type:"bytes"},{internalType:"bytes",name:"_value",type:"bytes"},{internalType:"uint256",name:"_branchMask",type:"uint256"},{internalType:"bytes32[]",name:"_siblings",type:"bytes32[]"}],name:"escalateMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"finalizeMotion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"failingExecutionAllowed",outputs:[{internalType:"bool",name:"_allowed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTotalStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVoterRewardFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserMinStakeFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxVoteFraction",outputs:[{internalType:"uint256",name:"_fraction",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakePeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSubmitPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevealPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEscalationPeriod",outputs:[{internalType:"uint256",name:"_period",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotion",outputs:[{components:[{internalType:"uint64[3]",name:"events",type:"uint64[3]"},{internalType:"bytes32",name:"rootHash",type:"bytes32"},{internalType:"uint256",name:"domainId",type:"uint256"},{internalType:"uint256",name:"skillId",type:"uint256"},{internalType:"uint256",name:"skillRep",type:"uint256"},{internalType:"uint256",name:"repSubmitted",type:"uint256"},{internalType:"uint256",name:"paidVoterComp",type:"uint256"},{internalType:"uint256[2]",name:"pastVoterComp",type:"uint256[2]"},{internalType:"uint256[2]",name:"stakes",type:"uint256[2]"},{internalType:"uint256[2]",name:"votes",type:"uint256[2]"},{internalType:"bool",name:"escalated",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address",name:"altTarget",type:"address"},{internalType:"bytes",name:"action",type:"bytes"}],internalType:"struct VotingReputationDataTypes.Motion",name:"_motion",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStake",outputs:[{internalType:"uint256",name:"_stake",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_structHash",type:"bytes32"}],name:"getExpenditureMotionCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_actionHash",type:"bytes32"}],name:"getExpenditurePastVote",outputs:[{internalType:"uint256",name:"_vote",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"}],name:"getMotionState",outputs:[{internalType:"enum VotingReputationDataTypes.MotionState",name:"_motionState",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"}],name:"getVoterReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_voterRep",type:"uint256"},{internalType:"address",name:"_voterAddress",type:"address"}],name:"getVoterRewardRange",outputs:[{internalType:"uint256",name:"_rewardMin",type:"uint256"},{internalType:"uint256",name:"_rewardMax",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"getStakerReward",outputs:[{internalType:"uint256",name:"_reward",type:"uint256"},{internalType:"uint256",name:"_penalty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_action",type:"bytes"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"createClaimDelayAction",outputs:[{internalType:"bytes",name:"_delayAction",type:"bytes"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_motionId",type:"uint256"},{internalType:"uint256",name:"_permissionDomainId",type:"uint256"},{internalType:"uint256",name:"_childSkillIndex",type:"uint256"},{internalType:"address",name:"_staker",type:"address"},{internalType:"uint256",name:"_vote",type:"uint256"}],name:"claimMisalignedReward",outputs:[],stateMutability:"nonpayable",type:"function"}],zi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};zi.abi=Hp;var{AddressZero:qp}=xt;var $u=F.from(10).pow(18),jn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(jn.extensionType),e.address);if(t===qp)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(jn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${jn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=jn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${jn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new jn(e,r,a)}static getLatestSupportedVersion(){return jn.supportedVersions[jn.supportedVersions.length-1]?.version}constructor(e,t,a){this.address=t.address,this.colony=e,this.votingReputationContract=t,this.version=a}async createMotionSalt(e){let{address:t}=this.votingReputationContract,a=F.from(e).toNumber(),i=`Sign this message to generate 'salt' entropy. Extension Address: ${t} Motion ID: ${a}`,r=await this.colony.getInternalColonyContract().signer.signMessage(i);return te.keccak256(r)}async getSideVoted(e,t,a){let{key:i,value:r,branchMask:s,siblings:o}=a,l;try{await this.votingReputationContract.estimateGas.revealVote(e,t,0,i,r,s,o),l=0}catch(p){if(p.message.includes("voting-rep-secret-no-match"))try{await this.votingReputationContract.estimateGas.revealVote(e,t,1,i,r,s,o),l=1}catch{}}return l}getInternalVotingReputationContract(){return this.votingReputationContract}initialize(e,t,a,i,r,s,o,l){return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"initialise",[e,t,a,i,r,s,o,l],async p=>({...ne("ExtensionInitialised",p)}))}async getMotion(e){if((await this.votingReputationContract.getMotionCount()).lt(e))throw new Error(`Motion with id ${e} does not exist`);return this.votingReputationContract.getMotion(e)}async getMotionResult(e){if(await this.getMotionState(e){let{actionCid:t,key:a,value:i,branchMask:r,siblings:s}=await Os(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,qp,ql);return[e,t,qp,ql,a,i,r,s]},async t=>({...ne("MotionCreated",t)}))}annotateDecision(e,t){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.colony.config.ipfs.uploadMetadata(Pe.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Decision})}approveStake(e,t=_e.RootDomain){return this.colony.colonyNetwork.createMetaTxCreator(this.colony.getInternalColonyContract(),"approveStake",[this.votingReputationContract.address,t,e],async a=>{let i=await this.colony.colonyNetwork.getTokenLocking();return{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.getSigner().getAddress(),s=await this.votingReputationContract.getMotionState(e);if(s!==Ot.Staking)throw new Error(`Motion cannot be staked. It's currently in "${Ot[s]}" state`);let o=await this.getMotion(e),l=await this.colony.colonyNetwork.getTokenLocking();if((await l.getUserDeposit(this.colony.token.address,r)).lt(a))throw new Error("Not enough tokens deposited for staking.");if((await l.getUserApproval(this.colony.token.address,r,this.colony.address)).lt(a))throw new Error("Not enough tokens approved for staking in the Colony.");if((await this.colony.getInternalColonyContract().getApproval(r,this.address,o.domainId)).lt(a))throw new Error("Not enough tokens approved for staking in the VotingReputation contract.");if(o.events[0].mul(1e3).lte(Date.now()))throw new Error("The staking period for this Motion has passed already.");let I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Pr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await ra(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),_,wt.Arbitration,this.address),{skillId:O}=await this.colony.getTeam(_),{key:U,value:H,branchMask:M,siblings:J}=await this.colony.reputation.getReputationWithProofs(O,r,v);return[e,S,L,F.from(t),a,U,H,M,J]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"stakeMotion",i,async r=>({...ne("MotionStaked",r),...ne("MotionEventSet",r)}))}submitVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Submit)throw new Error(`Motion cannot be voted on at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ne("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Reveal)throw new Error(`Motion cannot be revealed at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(r),l=await this.colony.config.getSigner().getAddress(),p=await this.colony.reputation.getReputationWithProofs(o,l,s),f=await this.createMotionSalt(e),x=t||await this.getSideVoted(e,f,p);if(!x)throw new Error(`Could not find a vote cast by ${l} for motion ${e}`);let{key:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ne("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=async()=>{let i=await this.votingReputationContract.getMotionState(e);if(i!==Ot.Closed)throw new Error(`Motion cannot be escalated at this time. It's currently in "${Ot[i]}" state`);let{domainId:r,rootHash:s}=await this.getMotion(e),{skillId:o}=await this.colony.getTeam(t),l=await this.colony.config.getSigner().getAddress(),p=await Ei(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ne("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ne("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.VotingReputation),t],async a=>({...ne("ExtensionUpgraded",a)}))}async getInitializationOptions(){let e=[this.votingReputationContract.getTotalStakeFraction(),this.votingReputationContract.getVoterRewardFraction(),this.votingReputationContract.getUserMinStakeFraction(),this.votingReputationContract.getMaxVoteFraction(),this.votingReputationContract.getStakePeriod(),this.votingReputationContract.getSubmitPeriod(),this.votingReputationContract.getRevealPeriod(),this.votingReputationContract.getEscalationPeriod()],[t,a,i,r,s,o,l,p]=await Promise.all(e);return{requiredStake:t,voterReward:a,minimumUserStake:i,endVoteThreshold:r,stakePhaseDuration:s,votingPhaseDuration:o,revealPhaseDuration:l,escalationPhaseDuration:p}}},Wa=jn;Wa.supportedVersions=[{version:7,factory:qi},{version:8,factory:Gi},{version:9,factory:zi}],Wa.extensionType=Ae.VotingReputation;var J1={["motion"]:Wa,["oneTx"]:za},jr=class{static async connect(e,t){let a=await Dr(t,e.config.signerOrProvider),i=jr.supportedVersions.find(p=>p.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the Colony contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new jr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return jr.supportedVersions[jr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new sa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,permissionConfig:i,eventData:r,txConfig:s})}getInternalColonyContract(){return this.colony}async updateExtensions(){if(!this.ext.motions)try{this.ext.motions=await Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await za.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}}async getBalance(e,t){if(t){let{fundingPotId:i}=await this.colony.getDomain(t),r=i,s=e||this.token.address;return this.colony.getFundingPotBalance(r,s)}return(e?new Vn(this.colonyNetwork,e):this.token).balanceOf(this.address)}edit(e){return this.createColonyTxCreator(this.colony,"editColony",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Colony,e),[t]},async t=>({...ne("ColonyMetadata",t)}),{metadataType:Pe.Colony})}createTeam(e){return e?this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256,string)",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t)}))}editTeam(e){return this.createPermissionedColonyTxCreator(this.colony,"editDomain",async()=>{let t;return typeof e=="string"?t=e:t=await this.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainMetadata",t)}),{metadataType:Pe.Domain})}deprecateTeam(e,t){return this.createPermissionedColonyTxCreator(this.colony,"deprecateDomain",[e,t],{roles:wt.Architecture,domain:e},async a=>({...ne("DomainDeprecated",a)}))}async getTeam(e){if((await this.colony.getDomainCount()).lt(e))throw new Error(`Team with id ${e} does not exist`);return this.colony.getDomain(e)}claimFunds(e){let t=e||this.token.address;return this.createColonyTxCreator(this.colony,"claimColonyFunds",[t],async a=>({...ne("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.RootDomain,o=i||this.token.address;return this.createColonyTxCreator(this.colony,"moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)",async()=>{if((await this.colony.getDomain(t)).fundingPotId.isZero())throw new Error(`Team with id ${F.from(t).toString()} does not exist`);let[p,f]=await ra(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,wt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ei(x,this.colony,r,s),_=await Ei(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.RootDomain){let{skillId:a}=await this.colony.getDomain(t),{reputationAmount:i}=await this.reputation.getReputation(a,e);return i}async getReputationAcrossTeams(e){return this.reputation.getReputationAcrossDomains(e)}makeArbitraryTransaction(e,t){return this.createColonyTxCreator(this.colony,"makeArbitraryTransactions",[[e],[t],!1],async a=>({...ne("ArbitraryTransaction",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Pe.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Annotation})}installExtension(e){let t=J1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Mi(i,a,this.version))throw new Error(`v${a} of ${i} extension is not compatible with colony v${this.version}`);let r=this.colonyNetwork.getInternalNetworkContract();return this.createColonyTxCreator(this.colony,"installExtension",[ja(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return fu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}mint(e){return this.createColonyTxCreator(this.colony,"mintTokens",[e],async t=>({...ne("TokensMinted",t)}))}deployTokenAuthority(e){let t=this.colonyNetwork.getInternalNetworkContract();return this.colonyNetwork.createMetaTxCreator(t,"deployTokenAuthority",async()=>{let a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ne("TokenAuthorityDeployed",a)}))}enterRecoveryMode(){return this.createColonyTxCreator(this.colony,"enterRecoveryMode",[],async e=>({...ne("RecoveryModeEntered",e)}))}exitRecoveryMode(){return this.createColonyTxCreator(this.colony,"exitRecoveryMode",[],async e=>({...ne("RecoveryModeExited",e)}))}upgrade(e){let t=e||this.version+1;return this.createColonyTxCreator(this.colony,"upgrade",[t],async a=>({...ne("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation award must be bigger than 0");return this.createColonyTxCreator(this.colony,"emitDomainReputationReward",[a,e,t],async i=>({...ne("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.RootDomain){if(F.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,F.from(0).sub(t)],{domain:a,roles:wt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Hr=jr;Hr.supportedVersions=[{version:11,factory:Fi},{version:12,factory:Li},{version:13,factory:Ui}];var{splitSignature:$1}=te,Qu=class extends ka{async getMetaTx(){let e=await this.getArgs();return this.sendMetaTransaction(this.contract.address,e)}async getMetaMined(e){let t=await this.waitForMetaTx(e);return this.getEventData(t)}async sendMetaTransaction(e,[t,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Bn.Custom?s=1:s=(await r.getNetwork()).chainId;let o=await i.getAddress(),l=await this.contract.functions.nonces(o),p=await this.contract.name(),f=Math.floor(Date.now()/1e3)+3600,x=await i._signTypedData({name:p,version:"1",chainId:s,verifyingContract:this.contract.address},{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},{owner:o,spender:t,value:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=$1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,r:I,s:_,v};return this.broadcastMetaTx(S)}tx(){if(this.method==="permit")throw new Error('Only MetaTransactions are supported for this method. Please use "approve" instead.');return super.tx.apply(this)}metaTx(){if(this.method!=="permit")throw new Error('Only the "permit" function is allowed to be sent as MetaTransaction per EIP-2612');return{send:async()=>{let e=await this.getMetaTx();return[e,this.getMetaMined.bind(this,e)]},mined:async()=>{let e=await this.getMetaTx();return this.getMetaMined(e)}}}};var Js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Ip(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...ne("UserTokenWithdrawn",a)}))}async getUserDeposit(e,t){return(await this.tokenLockingContract.getUserLock(e,t)).balance}async getUserApproval(e,t,a){return this.tokenLockingContract.getApproval(t,e,a)}};var $s=class{constructor(e,t){let a=t?.network||Bn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||yu[a],this.ipfs=new Ur(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Rr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Gp}=xt,Qs=class{constructor(e,t){this.config=new $s(e,t),this.contract=Bi.connect(t?.customNetworkAddress||pu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new ka({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ga({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createColony(e,t,a){let i=async()=>{if(await this.getColonyAddress(t))throw new Error(`Colony with label ${t} already exists`);if(typeof e!="string"){if(!e.name)throw new Error("Token name is required");if(!e.symbol)throw new Error("Token symbol is required");return[Gp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Pe.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Hr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ns[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Ns[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ds[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}registerUsername(e){let t=async()=>{if(await this.getColonyAddress(e))throw new Error(`Username ${e} is already taken`);return[e,""]};return this.createMetaTxCreator(this.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:Y1}=te,B6=new ia.Web3Provider(window.ethereum),U6,F6,Rt,ln,Wp,X1=async()=>(await B6.send("eth_requestAccounts",[]),B6.getSigner()),Z1=async n=>{let e=await X1();U6=await e.getAddress(),F6=new Qs(e),Rt=await F6.getColony(n)},eg=async n=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Nr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},tg=async n=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(n);ln=F.from(n);let t=await Rt.ext.motions.getRemainingStakes(n),a=await Rt.ext.motions.getMotionState(n);return{...e,motionState:Ot[a],remainingStakes:t}},ng=async n=>{await Rt.ext.motions?.approveStake(Nr(n)).tx().mined()},ag=async n=>{await Rt.ext.motions?.stakeMotion(ln,1,n).tx().mined()},ig=async n=>{await Rt.ext.motions?.stakeMotion(ln,0,n).tx().mined()},rg=async()=>{await Rt.ext.motions?.submitVote(ln,1).tx().mined(),Wp=1},sg=async()=>{await Rt.ext.motions?.submitVote(ln,0).tx().mined(),Wp=0},og=async()=>{await Rt.ext.motions?.revealVote(ln,Wp).tx().mined()},ug=async()=>{await Rt.ext.motions?.finalizeMotion(ln).tx().mined()},L6=document.querySelector("#current-wallet-address"),Yu=document.querySelector("#address"),V6=document.querySelector("#stake_clny_amount"),zp=document.querySelector("#payment_amount"),Kp=document.querySelector("#stake_amount"),j6=document.querySelector("#button_create_motion"),H6=document.querySelector("#motion_id"),q6=document.querySelector("#button_connect"),G6=document.querySelector("#button_stake_clny"),z6=document.querySelector("#button_get_motion"),W6=document.querySelector("#button_stake_yay"),K6=document.querySelector("#button_stake_nay"),J6=document.querySelector("#button_vote_yay"),$6=document.querySelector("#button_vote_nay"),Q6=document.querySelector("#button_reveal"),Y6=document.querySelector("#button_finalize"),Jp=document.querySelector("#error"),X6=document.querySelector("#result");if(!Yu||!V6||!zp||!H6||!Kp||!Jp||!X6||!q6||!G6||!j6||!z6||!W6||!K6||!J6||!$6||!Q6||!Y6)throw new Error("Could not find all required HTML elements");var Bt=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},Aa=()=>{Jp.innerText=""},Ce=n=>{X6.innerText=n};q6.addEventListener("click",async()=>{Aa();let n=Yu.value;if(!Y1(n))return Bt(new Error("This is not a valid address"));Ce("Processing...");try{await Z1(Yu.value),L6&&(L6.innerText=U6),Ce(` Connected to Colony with address: ${Rt.address}. Colony version: ${Rt.version}. Motions & Disputes extension is ${Rt.ext.motions?"installed":"not installed"}